aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-02-29ixgbe: fix spelling errorsDon Skidmore1-1/+1
Correct spelling error caught with codespell.py. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29ixgbe: Minor formatting and comment corrections for ixgbe_xmit_frame_ringAlexander Duyck1-6/+11
This patch is meant to address several minor issues in ixgbe_xmit_frame_ring. Specifically it adds a comment explaining the TXSW flag, and correctly wraps a line over 80 characters. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29e1000e: use msleep instead of mdelayBruce Allan1-3/+1
The e1000_link_stall_workaround_lv() function is always called in non- atomic context so it should use msleep instead of mdelay. Also, remove unnecessary #include <linux/delay.h>. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29e1000e: cleanup whitespace and indentationBruce Allan5-57/+38
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29e1000e: cleanup incorrect filename in commentBruce Allan1-1/+1
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29e100: Support RXALL feature flag.Ben Greear1-2/+20
This allows the NIC to receive packets with bad FCS and other errors. Good for sniffing packets on flakey networks. v4: Only flax rx-over-length errors if pkt is beyond maximum expected packet size, not just beyond the MTU. This matches the existing logic for this counter. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29e100: Support sending custom Ethernet CRCBen Greear1-0/+16
This can aid with testing the RX logic for bad CRCs. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-29e100: Support RXFCS feature flag.Ben Greear1-5/+30
This allows e100 to be configured to append the Ethernet FCS to the skb. Useful for sniffing networks. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: rename e1000e_reload_nvm() and call as function pointerBruce Allan6-4/+8
Rename e1000e_reload_nvm() to e1000e_reload_nvm_generic() to signify the function is used for more than one MAC-family type, and set and use it as a MAC ops function pointer to be consistent with the driver design. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: cleanup - remove unnecessary variableBruce Allan1-2/+1
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: use true/false for boolean send_xon, do not assume always trueBruce Allan2-2/+4
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: cleanup comment in e1000_hash_mc_addr()Bruce Allan1-2/+1
Remove reference to non-existant function. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: rename e1000e_config_collision_dist() and call as function pointerBruce Allan8-11/+14
Rename e1000e_config_collision_dist() to e1000e_config_collision_dist_generic() to signify the function is used for more than one MAC-family type, and set and use it as a MAC ops function pointer to be consistent with the driver design. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: comment correction in e1000e_set_kmrn_lock_loss_workaround_ich8lanBruce Allan1-1/+1
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: cleanup calls to setup_physical_interface function pointerBruce Allan1-1/+1
Call the MAC ops setup_physical_interface function pointer instead of the MAC-family-specific function to conform to the rest of the driver design. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: cleanup use of check_reset_block function pointerBruce Allan6-18/+16
Replace e1000_check_reset_block() inline function with calls to the PHY ops check_reset_block function pointer. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: cleanup use of check_mng_mode function pointerBruce Allan3-8/+3
Replace e1000_check_mng_mode() inline function with calls to the MAC ops check_mng_mode function pointer. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: cleanup: rename e1000e_setup_link() and call as function pointerBruce Allan5-8/+8
Rename e1000e_setup_link() to e1000e_setup_link_generic() to signify the function is used for more than one MAC-family type. The 82571-family has a custom setup_link function which also calls the generic function. The ich8lan-family has a custom function which should just be called via the function pointer. The 80003es2lan-family just uses the generic function. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: cleanup: rename e1000e_id_led_init() and call as function pointerBruce Allan5-10/+9
Rename e1000e_id_led_init() to e1000e_id_led_init_generic() to signify the function is used for more than one MAC-family type. For the ich8lan MAC family, some MACs use the generic function and others use the function e1000_id_led_init_pchlan(). In all cases where e1000e_id_led_init() was called directly, change to call the function pointer to be consistent with the driver design. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24ixgbevf: print MAC via printk format specifierDanny Kukawka1-7/+1
Print MAC/dev_addr via printk extended format specifier %pM instead of custom code. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-24v2 e1000: Neaten e1000_dump functionTushar Dave1-63/+50
Use pr_<level> for printk Use temporary instead of multiple pr_conts Coalesce formats. Save a few bytes of object code too: $ size drivers/net/ethernet/intel/e1000/e1000_main.o* text data bss dec hex filename 60507 369 14120 74996 124f4 drivers/net/ethernet/intel/e1000/e1000_main.o.new 60717 369 14176 75262 125fe drivers/net/ethernet/intel/e1000/e1000_main.o.old Removed printing of pktdata. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Tushar Dave <tushar.n.dave@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000: Neaten e1000_config_dsp_after_link_changeJoe Perches1-83/+73
Separate a complicated bit of e1000_config_dsp_after_link_change into a new static function e1000_1000Mb_check_cable_length. Reduces indentation and adds a bit of clarity. Signed-off-by: Joe Perches <joe@perches.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: cosmetic comment changes to make lines less than 80 charactersBruce Allan1-2/+2
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: cosmetic change to boolean comparisonsBruce Allan1-2/+2
Recent discussions on LKML, kernel-janitors, linux-wireless and netdev have suggested boolean comparisons should use logical operators instead of equality comparisons with true/false. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000: Support RX-FCS flag.Ben Greear1-10/+11
This allows the NIC to pass the Ethernet Frame Checksum (FCS) up the stack. Useful when sniffing packets. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000: Support sending custom Ethernet CRC.Ben Greear1-0/+13
Good for testing the RX logic for bad CRC handling. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: Support RXALL feature flag.Ben Greear2-4/+26
This allows the NIC to receive all frames available, including those with bad FCS, un-matched vlans, ethernet control frames, and more. Tested by sending frames with bad FCS. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: Support sending custom Ethernet CRC.Ben Greear1-0/+12
This can aid with testing the RX logic for bad CRCs. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-24e1000e: Support RXFCS feature flag.Ben Greear3-8/+39
This enables enabling/disabling reception of the Ethernet FCS. This can be useful when sniffing packets. For e1000e, enabling RXFCS can change the default behaviour for how the NIC handles CRC. Disabling RXFCS will take the NIC back to defaults, which can be configured as part of the module options. Signed-off-by: Ben Greear <greearb@candelatech.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-17igbvf: reset netdevice addr_assign_type if changedDanny Kukawka1-0/+1
Reset the state of addr_assign_type to NET_ADDR_PERM as soon as the MAC get changed via .ndo_set_mac_address. v2: use bitops to reset addr_assign_type Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-13e1000e: cleanup goto statements to exit points without common workBruce Allan8-303/+212
Per ./Documentation/CodingStyle, goto statements are acceptable for the centralized exiting of functions when there are multiple exit points which share common work such as cleanup. When no common work is required for multiple exit points, the function should just return at these exit points instead of doing an unnecessary jump to a centralized return. This patch cleans up the inappropriate use of goto statements, and removes unnecessary variables (or move to a smaller scope) where possible as a result of the cleanups. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: potentially incorrect return for e1000e_setup_fiber_serdes_linkBruce Allan1-1/+1
In the unlikely event that e1000_poll_fiber_serdes_link_generic() is called and it returns an error, the returned error code value is not propagated to the caller of e1000e_setup_fiber_serdes_link(). Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: potentially incorrect return for e1000_init_hw_ich8lanBruce Allan1-1/+1
In the unlikely event that e1000_setup_link_ich8lan() returns an error, the returned error code value is not propagated to the caller of e1000_init_hw_ich8lan(). Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: cleanup: minor whitespace addition (insert blank line separator)Bruce Allan1-0/+1
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: cleanup: remove unnecessary variable initializationsBruce Allan1-2/+2
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: cleanup: remove unnecessary test and returnBruce Allan1-2/+0
Fall-through to a return statement that effectively does the same. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: cleanup: remove unnecessary variable ret_valBruce Allan1-2/+1
ret_val gets initialized to -E1000_ERR_NVM and never set differently, so get rid of it and just return -E1000_ERR_NVM. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: cleanup: remove unreachable statementBruce Allan1-2/+0
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: potentially incorrect return for e1000_set_d3_lplu_state_ich8lanBruce Allan1-2/+2
In the unlikely event that e1e_wphy() returns an error, the returned error code is not propogated to the caller of e1000_set_d3_lplu_state_ich8lan(). With this change, there is a rare possibility that ret_val might not get set so it must be initialized. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: cleanup: always return 0Bruce Allan4-4/+4
These are a few instances of returning a value that can only be 0 so just use a 'return 0' to make it more obvious. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: cleanup: remove unnecessary assignments just before returningBruce Allan4-16/+7
Just return the appropriate value. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: potential incorrect return for e1000_setup_copper_link_80003es2lanBruce Allan1-3/+1
In the unlikely event that e1000e_setup_copper_link() returns an error, the returned error code value is not propogated to the caller of e1000_setup_copper_link_80003es2lan(). Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: potentially incorrect return for e1000_cfg_kmrn_10_100_80003es2lanBruce Allan1-3/+1
In the unlikely event that e1e_wphy() returns an error, the returned error code value is not propogated to the caller of e1000_cfg_kmrn_10_100_80003es2lan(). Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: cleanup: rename goto labels to be more meaningfulBruce Allan3-27/+27
In the following functions, rename the generic 'out' goto label to the more descriptive 'release' to indicate the type of common work that is done before exiting the functions. No functional change, cosmetic only. e1000_sw_lcd_config_ich8lan() e1000_oem_bits_config_ich8lan() e1000_init_phy_wakeup() e1000e_write_phy_reg_bm() e1000e_read_phy_reg_bm() e1000e_read_phy_reg_bm2() Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13e1000e: cleanup: use goto for common work needed by multiple exit pointsBruce Allan1-5/+5
There are two exit points of e1000e_write_nvm_spi() which require the nvm->ops.release() function pointer called just before exiting. Consolidate the two duplicate pieces of common work with a goto. With this change, the value ret_val will need to be returned instead of 0. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-02-13drivers/net: Remove boolean comparisons to true/falseJoe Perches4-11/+9
Booleans should not be compared to true or false but be directly tested or tested with !. Done via cocci script: @@ bool t; @@ - t == true + t @@ bool t; @@ - t != true + !t @@ bool t; @@ - t == false + !t @@ bool t; @@ - t != false + t Signed-off-by: Joe Perches <joe@perches.com> Reviewed-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-13rename dev_hw_addr_random and remove redundant secondDanny Kukawka2-15/+24
Renamed dev_hw_addr_random to eth_hw_addr_random() to reflect that this function only assign a random ethernet address (MAC). Removed the second parameter (u8 *hwaddr), it's redundant since the also given net_device already contains net_device->dev_addr. Set it directly. Adapt igbvf and ixgbevf to the changed function. Small fix for ixgbevf_probe(): if ixgbevf_sw_init() fails (which means the device got no dev_addr) handle the error and jump to err_sw_init as already done by igbvf in similar case. Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-12Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-nextDavid S. Miller4-278/+500
2012-02-10Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/netDavid S. Miller6-52/+81
Conflicts: drivers/infiniband/hw/nes/nes_cm.c Simple whitespace conflict. Signed-off-by: David S. Miller <davem@davemloft.net>
2012-02-10ixgbe: Combine post-DMA processing of sk_buff fields into single functionAlexander Duyck2-59/+71
This change combines a number of post-DMA Rx packet processing functions into a single function. The advantage of this is that it combines most of the Rx descriptor processing into one spot so it should all be warm in the cache. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>