aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel
AgeCommit message (Collapse)AuthorFilesLines
2012-01-31drivers/net: Remove unnecessary k.alloc/v.alloc OOM messagesJoe Perches3-11/+3
alloc failures use dump_stack so emitting an additional out-of-memory message is an unnecessary duplication. Remove the allocation failure messages. Signed-off-by: Joe Perches <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-26e1000e: update copyright yearBruce Allan14-15/+15
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: split lib.c into three more-appropriate filesBruce Allan4-995/+1051
The generic lib.c file contains code relative to the various MACs, NVM and Manageability supported by the driver. This patch splits the file into three which are specific to those areas similar to how the PHY-specific code is in phy.c and code specific to the 80003es2lan, 8257x, and ichX MAC families are in their own files. The generic code that is applicable to all MAC/PHY parts supported by the driver remains in netdev.c, param.c and ethtool.c files. No change in functionality, just moving code around for ease of maintenance, with some whitespace and other checkpatch cleanups. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: call er16flash() instead of __er16flash()Bruce Allan1-1/+1
__er16flash() is not meant to be called directly. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: increase version numberBruce Allan1-1/+1
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: convert final strncpy() to strlcpy()Bruce Allan1-3/+3
Convert the last instances of strncpy() to the preferred strlcpy(). Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: concatenate long debug strings which span multiple linesBruce Allan4-26/+15
To ease searching for debug message strings, concatenate strings that span multiple lines even if the resulting line exceeds 80 columns; these will not cause checkpatch warnings. Also, add '\n' and remove unnecessary '\r' from a few debug strings. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: conditionally restart autoneg on 82577/8/9 when setting LPLU stateBruce Allan1-1/+3
When setting the Low Power Link Up (LPLU, a.k.a. reverse auto-negotiation) on 82577/8278/82579, do not restart auto-negotiation if reset of the Phy is blocked by the Manageability Engine. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: increase Rx PBA to prevent dropping received packets on 82566/82567Bruce Allan1-2/+2
During bi-directional stress on some 82566/82567 devices, some received packets were dropped. Increasing the Receive Packet Buffer Allocation resolves this. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: ICHx/PCHx LOMs should use LPLU setting in NVM when going to SxBruce Allan1-4/+5
When going to Sx with an ICHx/PCH device, the default Low Power Link Up (LPLU, a.k.a. reverse auto-negotiation) behavior should be whatever is set in the NVM. However, the function e1000_suspend_workarounds_ich8lan() called when going to Sx always enabled LPLU in all power states. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: update workaround for 82579 intermittently disabled during S0->SxBruce Allan1-54/+49
The workaround which toggles the LANPHYPC (LAN PHY Power Control) value bit to force the MAC-Phy interconnect into PCIe mode from SMBus mode during driver load and resume should always be done except if PHY resets are blocked by the Manageability Engine (ME). Previously, the toggle was done only if PHY resets are blocked and the ME was disabled. The rest of the patch is just indentation changes as a consequence of the updated workaround. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: disable Early Receive DMA on ICH LOMsBruce Allan3-39/+25
Internal stress testing with jumbo frames shows the reliability of ICH9 and ICH10D devices is improved in certain corner cases by disabling the Early Receive feature. To reduce the performance impact caused by disabling this feature, the packet buffer sizes and relevant flow control settings are modified accordingly. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-26e1000e: Need to include vmalloc.hDavid S. Miller1-0/+1
Otherwise (on sparc64): drivers/net/ethernet/intel/e1000e/ethtool.c:657:3: error: implicit declaration of function 'vmalloc' [-Werror=implicit-function-declaration] Signed-off-by: David S. Miller <[email protected]>
2012-01-25e1000e: 82574/82583 Tx hang workaroundBruce Allan1-0/+4
On 82574/82583, there is a hardware bug which might cause a Tx hang when the internal buffer is full. Setting this bit enables a hardware fix to work around the issue. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: use hardware default values for Transmit Control registerBruce Allan1-9/+1
This code snippet is simply writing default values to the register which is unnecessary since the values are programmed into the register by default. There is a special case for 80003es2lan needing the Retransmit on Late Collision bit set but that is also done in e1000_init_hw_80003es2lan(). Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: use default settings for Tx Inter Packet Gap timerBruce Allan3-17/+3
Use the default hardware values for TIPG except for 80003es2lan(*). The code that is removed in this patch is either unnecessarily writing the TIPG register with the hardware default values for some devices (82571/2/3/4) or writing the wrong value for others (ICH/PCH LOMs). The only change in functionality is setting the correct default TIPG for the latter devices. (*) The correct value for 80003es2lan is already set properly in e1000_init_hw_80003es2lan() and e1000_cfg_kmrn_{10_100|1000}_80003es2lan(), and the unused flag FLAG_TIPG_MEDIUM_FOR_80003ESLAN is removed. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: 82579: workaround for link drop issueBruce Allan1-0/+22
When connected to certain switches, the 82579 PHY might drop link unexpectedly. Work around the issue by setting the Mean Square Error higher than the hardware default. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: always set transmit descriptor control registers the sameBruce Allan1-2/+2
The hardware erratum workaround where the TXDCTL register must be the same setting for both queues should always be done. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: default IntMode based on kernel config & available hardware supportBruce Allan1-7/+41
Based on a patch from Prabhakar Kushwaha <[email protected]>, set appropriate default interrupt mode dependent on whether CONFIG_PCI_MSI is enabled in the kernel configuration and if the hardware supports MSI-X. Set the module parameter log message accordingly. Signed-off-by: Bruce Allan <[email protected]> Cc: Jin Qing <[email protected]> Cc: Prabhakar Kushwaha <[email protected]> Cc: Jin Qing <[email protected]> Cc: Kumar Gala <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: re-factor ethtool get/set ring parameterBruce Allan1-59/+77
Make it more like how igb does it, with some additional error checking. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: pass pointer to ring struct instead of adapter structBruce Allan3-127/+136
For ring-specific functions, pass a pointer to the ring struct instead of a pointer to the adapter struct. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: convert head, tail and itr_register offsets to __iomem pointersBruce Allan3-32/+31
The Tx/Rx head and tail registers and itr_register are always at known addresses based on the __iomem address at which the PCI region (from BAR 0) is mapped and known offsets within the region for each of these registers. Store and use the full address rather than just the region offset to reduce unnecessary address calculations. Also, change current u8 __iomem pointers to void __iomem pointers. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: re-enable alternate MAC address for all devices which support itBruce Allan1-5/+2
Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: add Receive Packet Steering (RPS) supportBruce Allan4-6/+145
Enable RPS by default. Disallow jumbo frames when both receive checksum and receive hashing are enabled because the hardware cannot do both IP payload checksum (enabled when receive checksum is enabled when using packet split which is used for jumbo frames) and provide RSS hash at the same time. v2: added ethtool command to query flow hashing behavior per Ben Hutchings and changed the type of rsskey to cleanup the setting of the register array and avoid unnecessary casts (as pointed out by Joe Perches). The long error messages are not changed since there is nothing in the kernel ./Documentation that suggests the preferred method for dealing with long messages other than to never break strings; leaving them as-is for now. Signed-off-by: Bruce Allan <[email protected]> Tested-by: Jeff Pieper <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-25e1000e: cleanup Rx checksum offload codeBruce Allan1-12/+15
1) cleanup whitespace in e1000_rx_checksum() function header comment 2) do not check hardware checksum when Rx checksum is disabled 3) reduce duplicated calls to le16_to_cpu() by just using it within e1000_rx_checksum() instead of in each call to the function v2: use swab16 instead of le16_to_cpu & htons and corrected type for the passed-in csum Signed-off-by: Bruce Allan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-19ixgbevf: make operations tables constStephen Hemminger4-8/+8
The arrays of function pointers should be const to make life harder for rootkits. Signed-off-by: Stephen Hemminger <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-19ixgbevf: fix sparse warningsStephen Hemminger3-2/+4
Fixes sparse warnings: drivers/net/ethernet/intel/ixgbevf/vf.c:418:21: warning: symbol 'ixgbevf_82599_vf_info' was not declared. Should it be static? drivers/net/ethernet/intel/ixgbevf/vf.c:423:21: warning: symbol 'ixgbevf_X540_vf_info' was not declared. Should it be static? drivers/net/ethernet/intel/ixgbevf/mbx.c:331:29: warning: symbol 'ixgbevf_mbx_ops' was not declared. Should it be static? Signed-off-by: Stephen Hemminger <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-19ixgbevf: make ethtool ops and strings constStephen Hemminger1-2/+3
Signed-off-by: Stephen Hemminger <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-19ixgbevf: Prevent possible race condition by checking for messageGreg Rose1-18/+21
The mailbox interrupt routine might cause a race condition sometimes and cause a message to be missed. Signed-off-by: Greg Rose <[email protected]> Tested-by: Sibai Li <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-19ixgbe: Fix register defines to correctly handle complex expressionsAlexander Duyck1-16/+16
This patch is meant to address possible issues with the IXGBE register defines generating incorrect values when given a complex expression for the register offset. Signed-off-by: Alexander Duyck <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-19igbvf: Remove unnecessary irq disable/enableMitch A Williams1-5/+0
This irq disable/enable pair used to wrap access to the driver's vlgrp struct, which is no longer present. So, then, this could also so no longer be present. Signed-off-by: Mitch Williams <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-19igbvf: remove unneeded castStephen Hemminger1-2/+1
The cast and comment are unnecessary in the current upstream kernel. Signed-off-by: Stephen Hemminger <[email protected]> Tested-by: Garrett, RobertX E <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-19igb: Update Copyright on all Intel copyrighted files.Carolyn Wyborny17-18/+18
Signed-off-by: Carolyn Wyborny <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-19igb: make local functions staticStephen Hemminger2-4/+4
Sparse caught two functions that were only being used in one file. Signed-off-by: Stephen Hemminger <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-05ixgbe: FCoE: Add support for ndo_get_fcoe_hbainfo() callNeerav Parikh3-1/+90
This patch implements support for ndo_get_fcoe_hbainfo() call in the ixgbe driver. This function will be called by the FCoE protocol stack to obtain device specific information from the underlying device configured to do FCoE. Signed-off-by: Neerav Parikh <[email protected]> Tested-by: Ross Brattain <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-05igb: reset PHY after recovering from PHY power downKoki Sanagi1-0/+1
According to 82576_Datasheet.pdf, PHY setting is lost after PHY power down. So resetting PHY is needed when recovering from PHY power down to set a default setting to PHY register. Owing to this lack, NIC doesn't link up in some rare situation. Signed-off-by: Koki Sanagi <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-05igb: add basic runtime PM supportYan, Zheng2-19/+133
Use the runtime power management framework to add basic runtime PM support to the igb driver. Namely, make the driver suspend the device when the link is off and set it up for generating a wakeup event after the link has been detected again. This feature is disabled by default. Based on e1000e's runtime PM code. Changes since v1: Don't suspend the device when shutting down the interface. Avoid race between runtime suspending and ethtool operations. Signed-off-by: Zheng Yan <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-05igb: Add support for byte queue limits.Eric Dumazet2-0/+10
This adds support for byte queue limits (BQL) Since this driver collects bytes count in 'bytecount' field, use it also in igb_tx_map() Signed-off-by: Eric Dumazet <[email protected]> CC: Alexander Duyck <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-05e1000: cleanup CE4100 MDIO registers accessFlorian Fainelli2-12/+7
A global variable is currently used to hold the virtual address of the CE4100 MDIO base register address. Store the address in the e1000_hw structure and update macros accordingly. Signed-off-by: Florian Fainelli <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-05e1000: unmap ce4100_gbe_mdio_base_virt in e1000_removeFlorian Fainelli1-0/+2
We are not unmapping ce4100_gbe_mdio_base_virt in exit path in case we are running on a CE4100 adapter, fix that. Signed-off-by: Florian Fainelli <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-05e1000: fix lockdep splat in shutdown handlerJesse Brandeburg1-7/+1
As reported by Steven Rostedt, e1000 has a lockdep splat added during the recent merge window. The issue is that cancel_delayed_work is called while holding our private mutex. There is no reason that I can see to hold the mutex during pci shutdown, it was more just paranoia that I put the mutex_lock around the call to e1000_down. In a quick survey lots of drivers handle locking differently when being called by the pci layer. The assumption here is that we don't need the mutexes' protection in this function because the driver could not be unloaded while in the shutdown handler which is only called at reboot or poweroff. Reported-by: Steven Rostedt <[email protected]> Signed-off-by: Jesse Brandeburg <[email protected]> Tested-by: Steven Rostedt <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2012-01-02ixgbe: add support for new 82599 device.Don Skidmore3-5/+22
This device uses an already existing DevID but since it supports WoL we need to add the Sub DevID. It's support of WoL is limited to the first port. Signed-off-by: Don Skidmore <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-02ixgbe: add support for new 82599 device idEmil Tantilov3-0/+3
Support for new 82599 based quad port adapter. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-02ixgbe: add write flush in ixgbe_clock_out_i2c_byte()Emil Tantilov1-0/+1
I2C access is timing critical. Always do a write flush after writing to the I2CCTL register. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-02ixgbe: fix typo'sStephen Hemminger1-7/+7
Saw typo in one message, so decided to run spell checker. Signed-off-by: Stephen Hemminger <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-02ixgbe: fix incorrect PHY register readsEmil Tantilov1-4/+4
Fix some register reads that had the opcode and register parameters swapped. Also use define instead of a magic (0x3) number. Signed-off-by: Emil Tantilov <[email protected]> Tested-by: Phil Schmitt <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-02igb: Add flow control advertising to ethtool setting.Carolyn Wyborny1-2/+4
Added pause flag for bi-directional flow control advertising to ethtool settings. Signed-off-by: Carolyn Wyborny <[email protected]> Tested-by: Aaron Brown <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2012-01-02ixgbevf: Fix register defines to correctly handle complex expressionsAlexander Duyck2-23/+23
This patch is meant to address possible issues with the IXGBEVF register defines generating incorrect values when given a complex expression for the register offset. Signed-off-by: Alexander Duyck <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
2011-12-19net: fix assignment of 0/1 to bool variables.Rusty Russell6-26/+26
DaveM said: Please, this kind of stuff rots forever and not using bool properly drives me crazy. Joe Perches <[email protected]> gave me the spatch script: @@ bool b; @@ -b = 0 +b = false @@ bool b; @@ -b = 1 +b = true I merely installed coccinelle, read the documentation and took credit. Signed-off-by: Rusty Russell <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2011-12-08net: make vlan ndo_vlan_rx_[add/kill]_vid return error valueJiri Pirko7-29/+57
Let caller know the result of adding/removing vlan id to/from vlan filter. In some drivers I make those functions to just return 0. But in those where there is able to see if hw setup went correctly, return value is set appropriately. Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: David S. Miller <[email protected]>