aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/e1000e
AgeCommit message (Collapse)AuthorFilesLines
2012-04-03e1000e: Guarantee descriptor writeback flush success.Matthew Vick1-0/+17
In rare circumstances, a descriptor writeback flush may not work if it arrives on a specific clock cycle as a writeback request is going out. Signed-off-by: Matthew Vick <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-04-03e1000e: prevent oops when adapter is being closed and reset simultaneouslyBruce Allan2-0/+15
When the adapter is closed while it is simultaneously going through a reset, it can cause a null-pointer dereference when the two different code paths simultaneously cleanup up the Tx/Rx resources. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-27intel: make wired ethernet driver message level consistent (rev2)stephen hemminger1-1/+6
Dan Carpenter noticed that ixgbevf initial default was different than the rest. But the problem is broader than that, only one Intel driver (ixgb) was doing it almost right. The convention for default debug level should be consistent among Intel drivers and follow established convention. Signed-off-by: Stephen Hemminger <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-21Merge branch 'kmap_atomic' of git://github.com/congwang/linuxLinus Torvalds1-7/+4
Pull kmap_atomic cleanup from Cong Wang. It's been in -next for a long time, and it gets rid of the (no longer used) second argument to k[un]map_atomic(). Fix up a few trivial conflicts in various drivers, and do an "evil merge" to catch some new uses that have come in since Cong's tree. * 'kmap_atomic' of git://github.com/congwang/linux: (59 commits) feature-removal-schedule.txt: schedule the deprecated form of kmap_atomic() for removal highmem: kill all __kmap_atomic() [[email protected]: highmem: Fix ARM build break due to __kmap_atomic rename] drbd: remove the second argument of k[un]map_atomic() zcache: remove the second argument of k[un]map_atomic() gma500: remove the second argument of k[un]map_atomic() dm: remove the second argument of k[un]map_atomic() tomoyo: remove the second argument of k[un]map_atomic() sunrpc: remove the second argument of k[un]map_atomic() rds: remove the second argument of k[un]map_atomic() net: remove the second argument of k[un]map_atomic() mm: remove the second argument of k[un]map_atomic() lib: remove the second argument of k[un]map_atomic() power: remove the second argument of k[un]map_atomic() kdb: remove the second argument of k[un]map_atomic() udf: remove the second argument of k[un]map_atomic() ubifs: remove the second argument of k[un]map_atomic() squashfs: remove the second argument of k[un]map_atomic() reiserfs: remove the second argument of k[un]map_atomic() ocfs2: remove the second argument of k[un]map_atomic() ntfs: remove the second argument of k[un]map_atomic() ...
2012-03-20net: remove the second argument of k[un]map_atomic()Cong Wang1-6/+4
Acked-by: David S. Miller <[email protected]> Signed-off-by: Cong Wang <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29e1000e: cleanup whitespace and indentationBruce Allan5-57/+38
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29e1000e: cleanup incorrect filename in commentBruce Allan1-1/+1
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-24e1000e: cleanup - remove unnecessary variableBruce Allan1-2/+1
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-24e1000e: use true/false for boolean send_xon, do not assume always trueBruce Allan2-2/+4
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-24e1000e: comment correction in e1000e_set_kmrn_lock_loss_workaround_ich8lanBruce Allan1-1/+1
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-24e1000e: cosmetic comment changes to make lines less than 80 charactersBruce Allan1-2/+2
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-13e1000e: cleanup: minor whitespace addition (insert blank line separator)Bruce Allan1-0/+1
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-13e1000e: cleanup: remove unnecessary variable initializationsBruce Allan1-2/+2
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-13e1000e: cleanup: remove unreachable statementBruce Allan1-2/+0
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-13e1000e: cleanup: remove unnecessary assignments just before returningBruce Allan4-16/+7
Just return the appropriate value. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-10e1000e: replace '1' with 'true' for boolean get_link_statusBruce Allan2-4/+4
Signed-off-by: Bruce Allan <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-10e1000e: pass pointer to hw struct for e1000_init_mac_params_XXX()Bruce Allan3-11/+8
The e1000_init_mac_params_XXX() functions (where XXX is one of the three MAC-family types 80003es2lan, 82571 and ich8lan) was not meant to require a pointer to the adapter struct but does require a pointer to the hw struct. Pass that pointer in to the functions instead. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-10e1000e: use true/false for bool autoneg_falseBruce Allan1-7/+7
v2 - replaced mac->autoneg_failed == false with !mac->autoneg_failed Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-10e1000e: remove unnecessary parenthesesBruce Allan5-12/+12
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-10e1000e: remove unnecessary returns from void functionsBruce Allan3-14/+4
...and convert some goto's which simply return to just return. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-10e1000e: remove test that is always falseBruce Allan1-2/+2
warning: comparison of unsigned expression < 0 is always false Remove an unnecessary test that is reported when compiling driver with W=1. The test is unnecessary because Intel wired GbE hardware older (i.e. less) than 82571 is not supported by this driver. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-07e1000e: minor whitespace and indentation cleanupBruce Allan2-37/+43
Cleanup of some whitespace and indentation of a single code block. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-07e1000e: fix sparse warnings with -D__CHECK_ENDIAN__Bruce Allan2-8/+9
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-07e1000e: fix checkpatch warning from MINMAX testBruce Allan1-1/+1
WARNING: min() should probably be min_t(unsigned int, 4, skb->data_len) Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-07e1000e: cleanup - use braces in both branches of a conditional statementBruce Allan1-1/+2
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-07e1000e: cleanup e1000_set_phys_idBruce Allan1-2/+2
Use the existing hw pointer. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>