linux/drivers/net/ethernet
david decotigny 1ff39eb66b forcedeth: fix TX timeout caused by TX pause on down link
On some dual-port forcedeth devices such as MCP55 10de:0373 (rev a3),
when autoneg & TX pause are enabled while port is connected but
interface is down, the NIC will eventually freeze (TX timeouts,
network unreachable).

This patch ensures that TX pause is not configured in hardware when
interface is down. The TX pause request will be honored when interface
is later configured.

Tested:
 - hardware is MCP55 device id 10de:0373 (rev a3), dual-port
 - eth0 connected and UP, eth1 connected but DOWN
 - without this patch, following sequence would brick NIC:
      ifconfig eth0 down
      ifconfig eth1 up
      ifconfig eth1 down
      ethtool -A eth1 autoneg off rx on tx off
      ifconfig eth1 up
      ifconfig eth1 down
      ethtool -A eth1 autoneg on rx on tx on
      ifconfig eth1 up
      ifconfig eth1 down
      ifup eth0
      sleep 120  # or longer
      ethtool eth1
   Just in case, sequence to un-brick:
      ifconfig eth0 down
      ethtool -A eth1 autoneg off rx on tx off
      ifconfig eth1 up
      ifconfig eth1 down
      ifup eth0
 - with this patch: no TX timeout after "bricking" sequence above

Details:
 - The following register accesses have been identified as the ones
   causing the NIC to freeze in "bricking" sequence above:
    - write NVREG_TX_PAUSEFRAME_ENABLE_V1 to eth1's register NvRegTxPauseFrame
    - write NVREG_MISC1_PAUSE_TX | NVREG_MISC1_FORCE to eth1's register NvRegMisc1
    - write 0 to eth1's register NvRegTransmitterControl
   This is what this patch avoids.

Signed-off-by: David Decotigny <decot@googlers.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-08-30 13:04:27 -04:00
..
3com drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:46 -07:00
8390 net: add support for NS8390 based eth controllers on some ColdFire CPU boards 2012-07-12 07:54:45 -07:00
adaptec starfire: remove deprecated options. 2012-04-07 11:45:26 +02:00
adi bfin: Fix build failure due to get_ts_info() changes. 2012-04-06 00:17:50 -04:00
aeroflex ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
alteon
amd lance: remove unnecessary setting of skb->dev 2012-07-10 23:24:56 -07:00
apple ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
atheros atl1c: fix issue of io access mode for AR8152 v2.1 2012-07-20 11:21:18 -07:00
broadcom bnx2x: Fix compiler warnings 2012-08-12 13:42:18 -07:00
brocade drivers/net/ethernet: Fix non-kernel-doc comments with kernel-doc start markers 2012-07-10 23:13:46 -07:00
cadence net/macb: manage carrier state with call to netif_carrier_{on|off}() 2012-07-09 00:03:06 -07:00
calxeda net: calxedaxgmac: enable rx cut-thru mode 2012-07-10 23:25:47 -07:00
chelsio netvm: propagate page->pfmemalloc from skb_alloc_page to skb 2012-07-31 18:42:46 -07:00
cirrus cirrus: cs89x0: Remove function prototypes and reorder declarations 2012-05-18 23:48:07 -04:00
cisco enic: remove unnecessary setting of skb->dev 2012-07-10 23:24:56 -07:00
davicom dm9000: some coldfire boards need this 2012-05-14 18:40:16 -04:00
dec ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
dlink Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-07 23:35:40 -04:00
emulex emulex: benet: Add a missing CR in the end of message 2012-08-03 16:43:03 -07:00
faraday net: ftgmac100/ftmac100: dont pull too much data 2012-07-18 09:40:53 -07:00
freescale net/fsl: introduce Freescale 10G MDIO driver 2012-08-24 12:42:42 -04:00
fujitsu drivers/net: delete all code/drivers depending on CONFIG_MCA 2012-05-17 16:37:41 -04:00
hp ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
i825xx ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
ibm drivers/net/ethernet: Fix non-kernel-doc comments with kernel-doc start markers 2012-07-10 23:13:46 -07:00
icplus
intel Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next 2012-08-22 14:23:43 -07:00
marvell Merge branch 'v3.5-rc7-fixes' of git://github.com/lunn/linux into fixes 2012-07-25 21:37:09 +02:00
mellanox Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-08-21 16:46:08 -07:00
micrel ethernet: Use eth_random_addr 2012-07-16 22:38:27 -07:00
microchip
myricom myri10ge: set maximal number of default RSS queues 2012-07-05 03:06:44 -07:00
natsemi drivers/net: delete all code/drivers depending on CONFIG_MCA 2012-05-17 16:37:41 -04:00
neterion net: fix race condition in several drivers when reading stats 2012-07-22 12:12:32 -07:00
nuvoton
nvidia forcedeth: fix TX timeout caused by TX pause on down link 2012-08-30 13:04:27 -04:00
nxp lpc_eth: remove obsolete ifdefs 2012-08-08 16:07:51 -07:00
octeon netdev: octeon_mgmt: Convert to use device tree. 2012-07-23 13:54:53 +01:00
oki-semi pch_gbe: vlan skb len fix 2012-07-26 14:30:23 -07:00
packetengines yellowfin: stop using net_device.{base_addr, irq}. 2012-04-07 11:45:26 +02:00
pasemi net/pasemi: fix compiler warning 2012-05-02 20:52:48 -04:00
qlogic qlge: Add offload features to vlan interfaces 2012-07-29 23:18:30 -07:00
racal
rdc r6040: use module_pci_driver macro 2012-07-09 14:42:30 -07:00
realtek r8169: revert "add byte queue limit support". 2012-07-23 18:27:00 -07:00
renesas net: sh_eth: Add eth support for R8A7779 device 2012-08-20 02:16:54 -07:00
seeq seeq: use PTR_RET at init_module of driver 2012-07-29 23:18:30 -07:00
sfc sfc: Fix the initial device operstate 2012-08-24 20:10:24 +01:00
sgi ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
silan sc92031: stop using net_device.{base_addr, irq} 2012-04-07 11:45:27 +02:00
sis sis900: stop using net_device.{base_addr, irq} and convert to __iomem. 2012-04-07 11:47:18 +02:00
smsc ethernet: Use eth_random_addr 2012-07-16 22:38:27 -07:00
stmicro net/stmmac: fix issue of clk_get for Loongson1B. 2012-08-20 02:52:20 -07:00
sun niu: Change niu_rbr_fill() to use unlikely() to check niu_rbr_add_page() return value 2012-07-22 23:31:07 -07:00
tehuti drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:46 -07:00
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-08-22 14:21:38 -07:00
tile tilegx net: use eth_hw_addr_random(), not eth_random_addr() 2012-07-18 15:07:45 -04:00
toshiba drivers/net/ethernet: Fix (nearly-)kernel-doc comments for various functions 2012-07-10 23:13:46 -07:00
tundra
via ethernet: Remove casts to same type 2012-06-06 09:31:33 -07:00
wiznet w5300: using eth_hw_addr_random() for random MAC and set device flag 2012-08-24 13:30:27 -04:00
xilinx ethernet: Use eth_random_addr 2012-07-16 22:38:27 -07:00
xircom
xscale ixp4xx_eth: fix ptp_ixp46x build failure 2012-08-06 13:30:01 -07:00
dnet.c
dnet.h
ethoc.c ethernet: Use eth_random_addr 2012-07-16 22:38:27 -07:00
fealnx.c fealnx: Remove unused local label 'out' in netdev_open(). 2012-04-07 09:02:32 -04:00
jme.c jme: netpoll support 2012-07-18 09:40:54 -07:00
jme.h
Kconfig Ethernet driver for the WIZnet W5300 chip 2012-04-05 01:43:02 -04:00
korina.c
lantiq_etop.c ethernet: Use eth_random_addr 2012-07-16 22:38:27 -07:00
Makefile Ethernet driver for the WIZnet W5300 chip 2012-04-05 01:43:02 -04:00
mipsnet.c
netx-eth.c
s6gmac.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-05-22 19:22:50 -07:00