linux/drivers
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
..
accessibility
acpi
amba
ata
atm
auxdisplay
base dmesg fix for 3.6-rc3 2012-08-20 13:13:47 -07:00
bcma Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-08-24 12:25:30 -04:00
block cciss: fix incorrect scsi status reporting 2012-08-21 16:45:02 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-08-22 14:21:38 -07:00
cdrom
char
clk
clocksource cs5535-clockevt: typo, it's MFGPT, not MFPGT 2012-08-21 16:45:02 -07:00
connector
cpufreq
cpuidle
crypto
dca
devfreq
dio
dma
edac
eisa
extcon
firewire
firmware
gpio
gpu More USB patches for 3.6-rc3 2012-08-20 13:14:22 -07:00
hid
hsi
hv
hwmon sections: Fix section conflicts in drivers/hwmon 2012-08-18 16:17:43 -07:00
hwspinlock
i2c
ide
idle
ieee802154
iio
infiniband
input
iommu
isdn
leds
lguest
macintosh
md md/raid10: fix problem with on-stack allocation of r10bio structure. 2012-08-18 09:51:42 +10:00
media Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-08-21 16:54:38 -07:00
memory
memstick
message
mfd More USB patches for 3.6-rc3 2012-08-20 13:14:22 -07:00
misc drivers/misc/sgi-xp/xpc_uv.c: SGI XPC fails to load when cpu 0 is out of IRQ resources 2012-08-21 16:45:03 -07:00
mmc
mtd
net forcedeth: fix TX timeout caused by TX pause on down link 2012-08-30 13:04:27 -04:00
nfc
nubus
of dt: introduce for_each_available_child_of_node, of_get_next_available_child 2012-08-20 02:16:00 -07:00
oprofile
parisc
parport
pci
pcmcia
pinctrl
platform ideapad: add Lenovo IdeaPad Z570 support (part 3) 2012-08-20 12:44:41 -04:00
pnp
power
pps
ps3
ptp
pwm
rapidio rapidio/tsi721: fix unused variable compiler warning 2012-08-21 16:45:03 -07:00
regulator
remoteproc
rpmsg
rtc drivers/rtc/rtc-rs5c348.c: fix hour decoding in 12-hour mode 2012-08-21 16:45:03 -07:00
s390
sbus
scsi
sfi
sh
sn
spi spi: Updates for 3.6 2012-08-20 13:05:27 -07:00
ssb
staging Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-08-24 12:25:30 -04:00
target
tc
thermal
tty
uio
usb More USB patches for 3.6-rc3 2012-08-20 13:14:22 -07:00
uwb
vfio
vhost
video fbcon: fix race condition between console lock and cursor timer 2012-08-21 09:08:50 -07:00
virt
virtio
vlynq
vme
w1
watchdog
xen
zorro
Kconfig
Makefile