aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e (follow)
AgeCommit message (Collapse)AuthorFilesLines
2009-12-03drivers/net: Move && and || to end of previous lineJoe Perches1-4/+4
Only files where David Miller is the primary git-signer. wireless, wimax, ixgbe, etc are not modified. Compile tested x86 allyesconfig only Not all files compiled (not x86 compatible) Added a few > 80 column lines, which I ignored. Existing checkpatch complaints ignored. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: correct ICH/PCH PHY operations function pointersBruce Allan3-209/+204
Some function pointers for a few PHY operations (for 82578 and 82567) and were set incorrectly causing functions to be executed that were accessing incorrect PHY register offsets for that particular device. This patch also moves a few PHY-specific functions from ich8lan.c to the more appropriate phy.c. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: refactor PHY ID detection workaroundBruce Allan2-11/+17
The workaround that detects the correct PHY ID when an initial read of the PHY ID registers returns an invalid one should retry up to ten times with a small delay between attempts using a single PHY address and then repeat using the remaining possible PHY addresses. Do this instead of trying each possible PHY address repeating that up to 100 times. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: check_polarity function pointers not set for 8257xBruce Allan2-0/+4
The function pointers for 8257x devices are not set. This is not really a problem now because there is nothing in the driver that references the pointers for this particular MAC-family (the appropriate functions are called directly), but the pointers should be set in case they are used in the future. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: remove use of skb_dma_map from e1000e driverAlexander Duyck2-21/+47
In testing we have found that skb_dma_map/unmap is incompatible with HW IOMMU due to the fact that multiple mappings will return different results. In order to correct this we need to remove skb_dma_map/unmap calls from the e1000e driver. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: Use sizeof struct rather than pointer in e1000_get_eeprom()Roel Kluin1-1/+2
Don't use the sizeof the pointer to clear the result Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: PHY type cleanups in e1000e_check_downshift()Bruce Allan1-1/+1
Remove the case for 82577 because it does not support the ability to check for downshift. Add case for e1000_phy_bm which can do this. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: add debug messagesBruce Allan2-7/+23
Add some helpful debug messages. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: comment correctionsBruce Allan4-15/+11
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: enable new 82567V-3 deviceBruce Allan3-0/+3
This new PCI device ID is for a new combination of MAC and PHY both of which already have supporting code in the driver, just not yet in this combination. During validation of the device, an intermittent issue was discovered with waking it from a suspended state which can be resolved with the pre-existing workaround to disable gigabit speed prior to suspending. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: ensure the link state is correct for serdes linksBruce Allan1-28/+48
This patch ensures that the link state (as reported in mac->serdes_has_link) will transition to false when autoneg fails to complete but valid codewords were detected. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: provide family-specific PHY power up/down operationsBruce Allan7-39/+122
The different families (80003es2lan, 8257x, ICHx/PCH) supported by the driver each have their own conditions when the PHY can be powered down. This patch rewrites the PHY power up/down code to fit with the family- specific style used in the driver. All pre-existing calls to power up or down the PHY remain untouched. A new call to power down the PHY when removing the driver when the interface is down replaces the current call to reset the PHY in order to reduce power consumption. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: guard against buffer overflow in cable length tablesBruce Allan2-7/+24
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-02e1000e: provide family-specific functions to manage VLAN filter arraysBruce Allan6-16/+45
The two MAC-families that have VLAN filter table register arrays manage each a bit differently from one another, so provide family-specific functions for managing the register arrays and function pointers to access the appropriate function. Also make sure attempts to access these register arrays are not done on parts not supporting that feature. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-29Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller4-52/+60
Conflicts: drivers/ieee802154/fakehard.c drivers/net/e1000e/ich8lan.c drivers/net/e1000e/phy.c drivers/net/netxen/netxen_nic_init.c drivers/net/wireless/ath/ath9k/main.c
2009-11-21e1000e: update Tx Unit hang detection messageBruce Allan2-8/+39
The Tx unit hang detection code in e1000e detects other hangs caused by hardware components (e.g. Rx, DMA units), but it is not possible to detect exactly which component is hung so it has always assumed a Tx unit hang. When dumping a message to the system log because of a hang, this patch adds more data to help narrow the cause of the issue and makes the message non-Tx-specific. Because this new code reads PHY registers which can sleep, move it off to a workqueue. This and all previously existing work tasks in the driver are now cancelled when the driver is removed. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: cosmetic - group local variables of the same typeBruce Allan3-16/+9
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: remove redundant might_sleep()Bruce Allan1-2/+0
Now that mutex_lock() calls might_sleep() the driver doesn't have to here. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: do not error out on identification LED init failureBruce Allan3-9/+6
A failure to initialize the identification LED is not a fatal condition and should allow the init path to continue. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: set pm_qos DMA latency requirement per interface when neededBruce Allan1-19/+28
It was pointed out a pm_qos DMA latency requirement set when the driver is loaded when parts that support early receive of jumbo frames are probed could have that requirement overidden if another part supported by the driver (one that does not support early receive of jumbo frames) is probed later. Change the DMA latency requirement to be per-interface if needed instead of per driver. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: cleanup functions that clear hardware statisticsBruce Allan4-123/+116
The e1000_clear_hw_cntrs_*() functions read the registers to clear them. There is no reason to save the register contents so the temp variable can be removed. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: cleanup - shift indentation left by exiting early in e1000_tsoBruce Allan1-54/+50
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: set bools to true/false instead of 1/0Bruce Allan5-28/+30
Set booleans to 'true' or 'false' to make it clear it is a boolean. Also change instances of TRUE/FALSE in comments to lowercase true/false. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: provide comment for 82571 workaroundBruce Allan1-0/+7
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: remove comments regarding a non-existent api moduleBruce Allan2-31/+8
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: update copyright informationBruce Allan11-12/+12
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: cleanup ops function pointersBruce Allan8-203/+201
The phy and nvm operations structures have function pointers that contain "phy" and "nvm" in the pointer names which are redundant since the structures are already obviously in phy and nvm structures. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: consolidate two dbug macros into one simpler oneBruce Allan8-206/+183
This patch depends on a previous one that cleans up redundant #includes. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: cleanup redundant #include'sBruce Allan5-19/+1
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: Incorrect MII Link beat reporting.Bruce Allan1-0/+2
The driver was only updating MII stats when an LSC up was detected and the interface had not already been reported up to netdev. This meant MII stats returned in response to an SIOCGMIIREG ioctl would always show a link up if it had ever been up. This was misleading the networking daemon guessnet, which uses this ioctl, into making improper network port selections. This fix adds a call to e1000_phy_read_status() to actively read the mii stats before responding to the SIOCGMIIREG ioctl. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: disable K1 on PCH LOM when in PHY loopback modeBruce Allan3-2/+6
When performing the ethtool PHY loopback test on PCH-based LOMs (82577 and 82578), disable K1 (a MAC-PHY interconnect low power mode) otherwise packets might get corrupted. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: improper return code signageBruce Allan1-1/+1
The e1000_get_cable_length_82577() should return a negative value upon error. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: link reporting problemsBruce Allan1-0/+11
Copper links with WoL or management enabled (any condition which prevents the phy from being powered down when the interface is taken down) were always reporting link-up when the interface had been taken down. This is because when the interface is taken down (ifconfig ethx down), interrupts are disabled. With no interrupts, there is no LSC interrupt, which is normally required to set "get_link_status", which instructs the driver to query the device for link state. The fix is to force get_link_status to true if the interface is not up. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: don't clean Rx ring while resettingBruce Allan1-1/+1
When using legacy interrupts, do not clean the Rx ring while resetting otherwise traffic will not pass. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: function pointers for ethtool set/get offloadsBruce Allan1-0/+2
Provide missing function pointers for ethtool set/get offloads. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: clearing interrupt timers causes descriptors to get flushedBruce Allan1-2/+0
Clearing the interrupt timers following an IMS clear has the unwanted side-effect of flushing all descriptors immediately following a partial write when interrupts are disabled. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: add missing tests for 82583 in ethtool functionsBruce Allan1-1/+4
Add tests for 82583 in a couple ethtool functions that were missed from the initial hardware enablement submission. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-21e1000e: check WoL mode is among set of supported modesBruce Allan1-5/+4
When setting WoL feature, check the supplied modes are all supported rather than checking for no support. This way, if any new modes are added the driver does not default to not complaining about it if we don't really support it. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-20e1000e: do not initiate autonegotiation during OEM configurationBruce Allan1-1/+2
When configuring the OEM bits in the PHY on 82577/82578, do not restart autonegotiation if the firmware is blocking it (e.g. when an IDE-R session is active) because the link must not go down. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-20e1000e: remove unnecessary 82577 workaround causing link issuesBruce Allan1-10/+0
A workaround for pre-release versions of 82577 is causing link issues on some switches. The workaround is no longer needed on production parts so remove it. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-20e1000e: flow control thresholds not correct when changing mtuBruce Allan1-4/+3
When changing MTU, save it off prior to resetting otherwise the flow control thresholds may be miscalculated. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-20e1000e: add Tx timeout factor for 100MbpsBruce Allan1-1/+1
On some devices (e.g. 82578) not having a Tx timeout factor when linked at 100Mbps can cause false reports of hardware hangs on busy hubs. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-20e1000e: set flow control thresholds properly after enabling/disabling pauseBruce Allan1-2/+10
When flow control (pause) parameters were changed via ethtool (i.e. enabled or disabled), the newly calculated thresholds were not being written to the device for non-fiber media. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-20e1000e: read of PHY register may access wrong page on 82578Bruce Allan1-24/+22
Remove unnecessary workaround that mistakenly does not perform a page select operation for PHY registers 29 and 30 (assuming these are the PHY debug port address and data registers) on 82578 which can cause reads of the Transmit with No Carrier Sense statistics register on page 778 to be read from an incorrect page. Also error out if the page select operation fails. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-20e1000e: partial revert of 3ec2a2b8 plus FC workraround for 82577/8Bruce Allan3-12/+32
Commit 3ec2a2b80f3eb53851fe4cef9e65b5d33376ef89 broke Tx/Rx when using jumbo frames on certain parts (i.e. only PAUSE frames could be exchanged once the high water mark was reached preventing normal packet traffic). This patch reverts the breakage and sets appropriate high and low water marks of the Rx FIFO for 82577/82578 which require a workaround due to a flow control issue in hardware. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-18drivers/net: request_irq - Remove unnecessary leading & from second argJoe Perches2-8/+8
Not as fancy as coccinelle. Checkpatch errors ignored. Compile tested allyesconfig x86, not all files compiled. grep -rPl --include=*.[ch] "\brequest_irq\s*\([^,\)]+,\s*\&" drivers/net | while read file ; do \ perl -i -e 'local $/; while (<>) { s@(\brequest_irq\s*\([^,\)]+,\s*)\&@\1@g ; print ; }' $file ;\ done Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-11-06Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6David S. Miller5-106/+408
Conflicts: drivers/net/usb/cdc_ether.c All CDC ethernet devices of type USB_CLASS_COMM need to use '&mbm_info'. Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-29e1000e: rework disable K1 at 1000Mbps for 82577/82578Bruce Allan5-28/+190
This patch reworks a previous workaround (commit 7d3cabbcc) for an issue in hardware where noise on the interconnect between the MAC and PHY could be generated by a lower power mode (K1) at 1000Mbps resulting in bad packets. Disable K1 while at 1000 Mbps but keep it enabled for 10/100Mbps and when the cable is disconnected. The original version of this workaround was found to be incomplete. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-29e1000e: config PHY via software after resetsBruce Allan2-78/+218
On PCH-based (82577/82578) and some ICH8-based parts (82566) there is an issue with the hardware automatically configuring the PHY with contents from the EEPROM after the PHY is reset, so do the configuration by the driver instead. This was already similarly done for some 82566 parts in e1000_phy_hw_reset_ich8lan() but needs to be done after other resets, so move the PHY configuration code to its own function and call after all PHY resets. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2009-10-29e1000e: flow control doesn't re-enableBruce Allan1-2/+10
When changing flow control (pause) parameters, the flow control thresholds (i.e. when to send XON/XOFF frames) may not be setup correctly on parts with copper media. Call the existing e1000_set_fc_watermarks() function to set these thresholds. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>