aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/tg3.c
Commit message (Collapse)AuthorAgeFilesLines
* tg3: Fix crc errors on jumbo frame receiveNithin Nayak Sujir2013-02-141-21/+33
| | | | | | | | | | | | | | [ Upstream commit daf3ec688e057f6060fb9bb0819feac7a8bbf45c ] TG3_PHY_AUXCTL_SMDSP_ENABLE/DISABLE macros do a blind write to the phy auxiliary control register and overwrite the EXT_PKT_LEN (bit 14) resulting in intermittent crc errors on jumbo frames with some link partners. Change the code to do a read/modify/write. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tg3: Avoid null pointer dereference in tg3_interrupt in netconsole modeNithin Nayak Sujir2013-02-141-0/+4
| | | | | | | | | | | | | | | [ Upstream commit 9c13cb8bb477a83b9a3c9e5a5478a4e21294a760 ] When netconsole is enabled, logging messages generated during tg3_open can result in a null pointer dereference for the uninitialized tg3 status block. Use the irq_sync flag to disable polling in the early stages. irq_sync is cleared when the driver is enabling interrupts after all initialization is completed. Signed-off-by: Nithin Nayak Sujir <nsujir@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tg3: Apply short DMA frag workaround to 5906Matt Carlson2012-10-211-2/+3
| | | | | | | | | | | | | commit b7abee6ef888117f92db370620ebf116a38e3f4d upstream. 5906 devices also need the short DMA fragment workaround. This patch makes the necessary change. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Tested-by: Christian Kujau <lists@nerdbynature.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Mike Pagano <mpagano@gentoo.org>
* tg3: Fix TSO CAP for 5704 devs w / ASF enabledMatt Carlson2012-10-131-2/+12
| | | | | | | | | | | | | | | | | | | | | | [ Upstream commit cf9ecf4b631f649a964fa611f1a5e8874f2a76db ] On the earliest TSO capable devices, TSO was accomplished through firmware. The TSO cannot coexist with ASF management firmware though. The tg3 driver determines whether or not ASF is enabled by calling tg3_get_eeprom_hw_cfg(), which checks a particular bit of NIC memory. Commit dabc5c670d3f86d15ee4f42ab38ec5bd2682487d, entitled "tg3: Move TSO_CAPABLE assignment", accidentally moved the code that determines TSO capabilities earlier than the call to tg3_get_eeprom_hw_cfg(). As a consequence, the driver was attempting to determine TSO capabilities before it had all the data it needed to make the decision. This patch fixes the problem by revisiting and reevaluating the decision after tg3_get_eeprom_hw_cfg() is called. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tg3: Avoid panic from reserved statblk field accessMatt Carlson2012-05-211-2/+16
| | | | | | | | | | | | | | | [ Upstream commit f891ea1634ce41f5f47ae40d8594809f4cd2ca66 ] When RSS is enabled, interrupt vector 0 does not receive any rx traffic. The rx producer index fields for vector 0's status block should be considered reserved in this case. This patch changes the code to respect these reserved fields, which avoids a kernel panic when these fields take on non-zero values. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tg3: negate USE_PHYLIB flag checkJiri Pirko2011-11-111-1/+1
| | | | | | | | | | | | | | | | | | [ Upstream commit e730c82347b9dc75914da998c44c3f348965db41 ] USE_PHYLIB flag in tg3_remove_one() is being checked incorrectly. This results tg3_phy_fini->phy_disconnect is never called and when tg3 module is removed. In my case this resulted in panics in phy_state_machine calling function phydev->adjust_link. So correct this check. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Acked-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tg3: Fix int selftest for recent devices.Matt Carlson2011-10-031-2/+6
| | | | | | | | | | | | | | commit 3aa1cdf87c0b3f2345e75c474acc32ebbf0a4724 upstream. This patch fixes interrupt selftest failures for recent devices (57765, 5717, 5718. 5719, 5720) by disabling MSI one-shot mode and applying the status tag workaround to the selftest code. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tg3: Add 5719 and 5720 to EEE_CAP listMatt Carlson2011-10-031-1/+3
| | | | | | | | | | | | | commit 5baa5e9aa28baccd2a1227095c25bb3e999f250d upstream. This patch adds the 5719 and the 5720 to the list of devices that are EEE capable. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tg3: Fix io failures after chip resetMatt Carlson2011-10-031-12/+6
| | | | | | | | | | | | | | | | | commit 9e975cc291d80d5e4562d6bed15ec171e896d69b upstream. Commit f2096f94b514d88593355995d5dd276961e88af1, entitled "tg3: Add 5720 H2BMC support", needed to add code to preserve some bits set by firmware. Unfortunately the new code causes throughput to stop after a chip reset because it enables state machines before they are ready. This patch undoes the problematic code. The bits will be restored later in the init sequence. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* tg3: Fix tg3_skb_error_unmap()Matt Carlson2011-06-031-1/+1
| | | | | | | | | | This function attempts to free one fragment beyond the number of fragments that were actually mapped. This patch brings back the limit to the correct spot. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Tested-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Add Fujitsu 1000base-SX PCI ID to tg3Meelis Roos2011-05-251-0/+1
| | | | | | | | | | This patch adds the PCI ID of Fujitsu 1000base-SX NIC to tg3 driver. Tested to detect the card, MAC and serdes, not tested with link at the moment since I have no fiber switch here. I did not add new constants to the pci_ids.h header file since these constants are used only here. Signed-off-by: Meelis Roos <mroos@linux.ee> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Add braces around 5906 workaround.Matt Carlson2011-05-201-1/+3
| | | | | | | | | | Commit dabc5c670d3f86d15ee4f42ab38ec5bd2682487d, entitled "tg3: Move TSO_CAPABLE assignment", moved some TSO flagging code around. In the process it failed to add braces around an exceptional 5906 condition. This patch fixes the problem. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Fix NETIF_F_LOOPBACK errorMatt Carlson2011-05-201-2/+3
| | | | | | | | | | | Mahesh Bandewar noticed that the features cleanup in commit 0da0606f493c5cdab74bdcc96b12f4305ad94085, entitled "tg3: Consolidate all netdev feature assignments", mistakenly sets NETIF_F_LOOPBACK by default. This patch corrects the error. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Update version to 3.119Matt Carlson2011-05-191-2/+2
| | | | | | | | This patch updates the tg3 version to 3.119. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Apply rx_discards fix to 5719/5720Matt Carlson2011-05-191-1/+3
| | | | | | | | | | | Commit 4d95847381228639844c7197deb8b2211274ef22, entitled "tg3: Workaround rx_discards stat bug", was intended to be applied to the 5717, 5718, 5719_A0, and 5720 A0 chip revisions. The implementation missed the latter two when applying the fix in a critical area. This patch fixes the problem. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Remove excessive parenthesisMatt Carlson2011-05-191-18/+18
| | | | | | | | This patch removes some excessive parenthesizing. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Consolidate all netdev feature assignmentsMatt Carlson2011-05-191-27/+24
| | | | | | | | | This patch consolidates all the netdev feature bit assignments to one location. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Move TSO_CAPABLE assignmentMatt Carlson2011-05-191-15/+16
| | | | | | | | | | This patch moves the code that asserts the TSO_CAPABLE flag closer to where the TSO capabilities flags are set. There isn't a good enough reason for the code to be separated. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Fix stats for 5704 and later devicesMatt Carlson2011-05-191-2/+5
| | | | | | | | | | | | Commit 4d95847381228639844c7197deb8b2211274ef22, entitled "tg3: Workaround rx_discards stat bug" modified the hardware statistics data structure. The modification shifted the statistics so that the labels no longer corresponded to the counter values. This patch fixes the problem by utilizing reserved space for the new counters. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Fix TSO loopback testMatt Carlson2011-05-191-1/+1
| | | | | | | | | | Commit bb158d696489244f79fd4c3abd47968a06b48c79, entitled "tg3: Add TSO loopback test", mistakenly inverted the checksum field test from the receive BD. This patch corrects the problem. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Consolidate autoneg advertisement setup codeMatt Carlson2011-05-191-118/+99
| | | | | | | | | | Autonegotiation setup has gotten a little more complicated since the tg3 driver was created. This patch consolidates autoneg setup into one routine and modifies the call sites accordingly. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Fix EEE interoperability workaroundMatt Carlson2011-05-191-20/+21
| | | | | | | | | | | Commit 21a00ab270f95d32e502d92f166dd75c518d3c5f, entitled "tg3: Fix EEE interoperability issue", added an EEE interoperability fix. We found that the fix doesn't work if applied too early though. This patch delays the fix until right before allowing LPI assertion. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Fix IPv6 TCP problems for 5719Matt Carlson2011-05-191-1/+1
| | | | | | | | | | | | | Commit 4d163b75e979833979cc401ae433cb1d7743d57e, entitled "tg3: Fix 5719 A0 tx completion bug" turned off TSO to fix a hardware bug. In doing so, it accidentally turned off all IPv6 TCP checksum offloading too. This patch fixes the problem by reenabling the hardware bit that control both features. The TSO capability is still not exposed to the kernel. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Fix 57765 B0 data corruptionMatt Carlson2011-05-191-0/+16
| | | | | | | | | The PCIe max FTS limit is too aggressive on these chips. This patch loosens the limit a little to eliminate data corruption issues. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Cleanup transmit error pathMatt Carlson2011-05-191-60/+38
| | | | | | | | | | | This patch consolidates the skb cleanup code into a function named tg3_skb_error_unmap(). The modification addresses a long-standing bug where pci_unmap_single() was incorrectly being called instead of pci_unmap_page() in tigon3_dma_hwbug_workaround(). Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Set tx bug flags for more devicesMatt Carlson2011-05-191-229/+33
| | | | | | | | | | | | It has been recently discovered that all tg3 devices have a 4Gb boundary DMA problem, and that all 5755 and newer devices can't handle fragments less than or equal to 8 bytes in size. This patch adjusts the flags and removes tg3_start_xmit(). tg3_start_xmit_dma_bug() has been renamed to tg3_start_xmit(). Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* tg3: Allow ethtool to enable/disable loopback.Mahesh Bandewar2011-05-121-2/+67
| | | | | | | | | This patch adds tg3_set_features() to handle loopback mode. Currently the capability is added for the devices which support internal MAC loopback mode. So when enabled, it enables internal-MAC loopback. Signed-off-by: Mahesh Bandewar <maheshb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* Merge branch 'master' of ↵David S. Miller2011-05-051-2/+6
|\ | | | | | | | | | | | | master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: drivers/net/tg3.c
| * tg3: Fix failure to enable WoL by default when possibleRafael J. Wysocki2011-05-021-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | tg3 is supposed to enable WoL by default on adapters which support that, but it fails to do so unless the adapter's /sys/devices/.../power/wakeup file contains 'enabled' during the initialization of the adapter. Fix that by making tg3 use device_set_wakeup_enable() to enable wakeup automatically whenever WoL should be enabled by default. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ethtool: cosmetic: Use ethtool ethtool_cmd_speed APIDavid Decotigny2011-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates the network drivers so that they don't access the ethtool_cmd::speed field directly, but use ethtool_cmd_speed() instead. For most of the drivers, these changes are purely cosmetic and don't fix any problem, such as for those 1GbE/10GbE drivers that indirectly call their own ethtool get_settings()/mii_ethtool_gset(). The changes are meant to enforce code consistency and provide robustness with future larger throughputs, at the expense of a few CPU cycles for each ethtool operation. All drivers compiled with make allyesconfig ion x86_64 have been updated. Tested: make allyesconfig on x86_64 + e1000e/bnx2x work Signed-off-by: David Decotigny <decot@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ethtool: Use full 32 bit speed range in ethtool's set_settingsDavid Decotigny2011-04-291-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | This makes sure the ethtool's set_settings() callback of network drivers don't ignore the 16 most significant bits when ethtool calls their set_settings(). All drivers compiled with make allyesconfig on x86_64 have been updated. Signed-off-by: David Decotigny <decot@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Convert u32 flag,flg2,flg3 uses to bitmapJoe Perches2011-04-281-654/+645
| | | | | | | | | | | | | | | | | | | | | | | | | | Using a bitmap instead of separate u32 flags allows a consistent, simpler and more extensible mechanism to determine capabilities. Convert bitmasks to enum. Add tg3_flag, tg3_flag_clear and tg3_flag_set. Convert the flag & bitmask tests. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Update version to 3.118Matt Carlson2011-04-261-2/+2
| | | | | | | | | | | | | | | | | | This patch updates the tg3 version to 3.118. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Whitespace cleanupsMatt Carlson2011-04-261-7/+2
| | | | | | | | | | | | | | | | | | This patch gets rid of some harmless whitespace errors. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Add EEH supportMatt Carlson2011-04-261-0/+147
| | | | | | | | | | | | | | | | | | This patch adds EEH support to the tg3 driver. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Add TSO loopback testMatt Carlson2011-04-261-35/+123
| | | | | | | | | | | | | | | | | | | | This patch adds code to exercise the TSO portion of the device through a phy loopback test. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Benjamin Li <benli@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Organize loopback test failure flagsMatt Carlson2011-04-261-8/+12
| | | | | | | | | | | | | | | | | | | | | | As more test modes are added to each loopback mode, the need to organise the results increases. This patch groups the results by loopback mode, and then by test mode. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Fix int generation hw bug for 5719 / 5720Matt Carlson2011-04-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | On the 5719 and 5720, there is a bug where the hardware will misinterpret a status tag update and leave interrupts permanently disabled. This patch enables a hardware fix that works around the issue. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Add additional EEE messagingMatt Carlson2011-04-211-2/+9
| | | | | | | | | | | | | | | | | | This patch adds link messages and an item to the sign-on banner to make EEE status more visible. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Add macro for SMDSP togglingMatt Carlson2011-04-211-56/+46
| | | | | | | | | | | | | | | | | | | | | | A common AUX CTRL operation in the driver is to enable and disable the SMDSP. This patch consolidates the code so that the details of the operation are in one place. This patch also adds code to make sure the SMDSP is enabled before executing code that relies on it. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Add write accessor for AUX CTRL phy regMatt Carlson2011-04-211-17/+31
| | | | | | | | | | | | | | | | This patch adds a write accessor for the aux ctrl phy register. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Add read accessor for AUX CTRL phy regMatt Carlson2011-04-211-11/+28
| | | | | | | | | | | | | | | | This patch adds a read accessor for the aux ctrl register. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Move phy accessor functions higherMatt Carlson2011-04-211-68/+68
| | | | | | | | | | | | | | | | | | Phy accessor functions should live closer to where the base phy read / write routines are. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Only allow phy ioctls while netif_runningMatt Carlson2011-04-211-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When tg3 was new, phy accesses through ioctl were allowable at any time. Then, the driver started shutting down the phy when the device was closed. Phy accesses would be allowed when the driver first attached to the device, but then would be forbidden after the device had been up'd and down'd. After that, management firmware made it illegal to access the phy unless the driver "owned" the device. Now that most firmware is being moved over to the APE, it is less clear when phy accesses are safe. While it is possible to attempt to identify these conditions and code the driver to navigate through the pitfalls, it could be perplexing to the admin why phy accesses work in some cases and not others. This patch brings some uniformity to the problem by only allowing phy accesses while the driver has control of the device. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Nullify RSS for loopback testMatt Carlson2011-04-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | The loopback test assumes all traffic goes to the first rx queue. There is a 1 in 4 chance this won't be true if RSS is enabled though. This patch reprograms the RSS indirection table to route all rx packets to the first queue. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Adjust rx prod ring bd replenish thresholdsMatt Carlson2011-04-211-21/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The oldest tg3 devices had large rx producer ring BD caches. Back then, it made sense to make the BD cache replenish threshold only a function of the number of rx buffers posted by the driver. Since then, the BD cache sizes have shrunk to 25% of their original size and, in some cases, the ring sizes have quadrupled in size. Under such conditions, static BD cache replenish thresholds no longer match the hardware constraints. This patch attempts to factor in the BD cache size into the bd cache replenish strategy, taking the existing hardware bugs into account. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Workaround rx_discards stat bugMatt Carlson2011-04-211-1/+26
| | | | | | | | | | | | | | | | | | | | | | | | The 5717, 5718, 5719 A0, and 5720 A0 has a bug where the rx_discards statistic counter will increment when dropping unwanted multicast frames. This patch works around the problem by attempting to recreate the data using other means. The resulting value will not be accurate, but it can still serve as a problem indicator. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | ethtool: allow custom interval for physical identificationAllan, Bruce W2011-04-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When physical identification of an adapter is done by toggling the mechanism on and off through software utilizing the set_phys_id operation, it is done with a fixed duration for both on and off states. Some drivers may want to set a custom duration for the on/off intervals. This patch changes the API so the return code from the driver's entry point when it is called with ETHTOOL_ID_ACTIVE can specify the frequency at which to cycle the on/off states, and updates the drivers that have already been converted to use the new set_phys_id and use the synchronous method for identifying an adapter. The physical identification frequency set in the updated drivers is based on how it was done prior to the introduction of set_phys_id. Compile tested only. Also fixes a compiler warning in sfc. v2: drivers do not return -EINVAL for ETHOOL_ID_ACTIVE v3: fold patchset into single patch and cleanup per Ben's feedback Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Cc: Ben Hutchings <bhutchings@solarflare.com> Cc: Sathya Perla <sathya.perla@emulex.com> Cc: Subbu Seetharaman <subbu.seetharaman@emulex.com> Cc: Ajit Khaparde <ajit.khaparde@emulex.com> Cc: Michael Chan <mchan@broadcom.com> Cc: Eilon Greenstein <eilong@broadcom.com> Cc: Divy Le Ray <divy@chelsio.com> Cc: Don Fry <pcnet32@frontier.com> Cc: Jon Mason <jdmason@kudzu.us> Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com> Cc: Steve Hodgson <shodgson@solarflare.com> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Matt Carlson <mcarlson@broadcom.com> Acked-by: Jon Mason <jdmason@kudzu.us> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Add support for extended VPD blocksMatt Carlson2011-04-131-44/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | In some devices, the VPD block is relocated to a different area in NVRAM. The original location can still contain old, but still valid VPD data. This patch changes the code to look for an extended VPD block in NVRAM. If one is found, that block is used for all VPD operations instead. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
* | tg3: Add jumbo frame loopback tests to selftestMatt Carlson2011-04-131-9/+25
| | | | | | | | | | | | | | | | | | | | This patch adds jumbo frame loopback test support to the ethtool selftest. Signed-off-by: Matt Carlson <mcarlson@broadcom.com> Reviewed-by: Michael Chan <mchan@broadcom.com> Reviewed-by: Benjamin Li <benli@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>