aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel
AgeCommit message (Collapse)AuthorFilesLines
2012-03-12net: Fix issue with netdev_tx_reset_queue not resetting queue from XOFF stateAlexander Duyck1-1/+2
We are seeing dev_watchdog hangs on several drivers. I suspect this is due to the __QUEUE_STATE_STACK_XOFF bit being set prior to a reset for link change, and then not being cleared by netdev_tx_reset_queue. This change corrects that. In addition we were seeing dev_watchdog hangs on igb after running the ethtool tests. We found this to be due to the fact that the ethtool test runs the same logic as ndo_start_xmit, but we were never clearing the XOFF flag since the loopback test in ethtool does not do byte queue accounting. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-12ixgbe: add support for byte queue limitsAlexander Duyck2-0/+12
This adds support for byte queue limits (BQL). Based on patch from Eric Dumazet for igb. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Stephen Ko <[email protected]>
2012-03-12ixgbe: remove tie between NAPI work limits and interrupt moderationJeff Kirsher1-6/+0
As noted by Ben Hutchings and David Miller, work limits for NAPI should not be tied to interrupt moderation parameters. This should be handled by NAPI, possibly through sysfs. Neil Horman & Stephen Hemminger are working on a solution for NAPI currently. In the meantime, remove this tie between work limits and interrupt moderation. Signed-off-by: Jeff Kirsher <[email protected]> CC: Ben Hutchings <[email protected]> Tested-by: Phil Schmitt <[email protected]>
2012-03-12igb: fix ethtool offline testJeff Kirsher1-0/+7
A bug was introduced with the following patch: Commmit bdbc063129e811264cd6c311d8c2d9b95de01231 Author: Eric Dumazet <[email protected]> igb: Add support for byte queue limits. The ethtool offline tests will cause a perpetual link flap, this is because the tests also need to account for byte queue limits (BQL). CC: Eric Dumazet <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: John Fastabend <[email protected]> Tested-by: Jeff Pieper <[email protected]>
2012-03-02net: dcb: getnumtcs()/setnumtcs() should return an intJohn Fastabend1-2/+2
{g|s}etnumtcs() today returns a u8 that is only used by the DCB code to verify no error occurred. Today the driver implementations return negative error codes which end up being non-zero so the logic works out but triggers some sparse warnings. To fix the sparse warnings convert the return value to an int. CC: Eilon Greenstein <[email protected]> Reported-by: Dan Carpenter <[email protected]> Signed-off-by: John Fastabend <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-02ixgbe: dcb: check setup_tc return codesJohn Fastabend1-8/+18
dcb netlink code calls setup_tc to init hardware traffic classes to use for DCB. At some call sites the return values are not checked for errors and in one case may return -EINVAL back to the net/dcbnl.c caller which is expecting a u8. This fixes some smatch hits and although failures are never seen in practive its best to check return codes. Reported-by: Dan Carenter <[email protected]> Signed-off-by: John Fastabend <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-02e100: Show short v/s long rx length errors in ethtool stats.Ben Greear1-0/+3
Signed-off-by: Ben Greear <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-03-02e100: Fix rx-over-length statistics.Ben Greear1-1/+4
The old code would += the total errors every time stats were gathered. Instead, keep a count of short-pkt and long-pkt counters and then simply add them together for the rx-over-length stat. Signed-off-by: Ben Greear <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29ixgbe: Fix comments that are out of date or formatted incorrectlyAlexander Duyck1-4/+9
This patch corrects several comments that are either incorrect or formatted incorrectly for multiline comments. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-02-29ixgbe: fix spelling errorsDon Skidmore1-1/+1
Correct spelling error caught with codespell.py. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[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-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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[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-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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
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 <[email protected]> Signed-off-by: Tushar Dave <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[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-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 <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
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 <[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-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 <[email protected]> Signed-off-by: David S. Miller <[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]>