linux/drivers/net/ethernet
françois romieu c7c2c39be8 r8169: fix Rx index race between FIFO overflow recovery and NAPI handler.
Since 92fc43b415, rtl8169_tx_timeout ends up
resetting Rx and Tx indexes and thus racing with the NAPI handler via
-> rtl8169_hw_reset
   -> rtl_hw_reset
      -> rtl8169_init_ring_indexes

What about returning to the original state ?

rtl_hw_reset is only used by rtl8169_hw_reset and rtl8169_init_one.

The latter does not need rtl8169_init_ring_indexes because the indexes
still contain their original values from the newly allocated network
device private data area (i.e. 0).

rtl8169_hw_reset is used by:
1. rtl8169_down
   Helper for rtl8169_close. rtl8169_open explicitely inits the indexes
   anyway.
2. rtl8169_pcierr_interrupt
   Indexes are set by rtl8169_reinit_task.
3. rtl8169_interrupt
   rtl8169_hw_reset is needed when the device goes down. See 1.
4. rtl_shutdown
   System shutdown handler. Indexes are irrelevant.
5. rtl8169_reset_task
   Indexes must be set before rtl_hw_start is called.
6. rtl8169_tx_timeout
   Indexes should not be set. This is the job of rtl8169_reset_task anyway.

The removal of rtl8169_hw_reset in rtl8169_tx_timeout and its move in
rtl8169_reset_task do not change the analysis.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: hayeswang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-12-05 18:31:42 -05:00
..
3com
8390
adaptec
adi
aeroflex
alteon
amd
apple
atheros
broadcom bnx2x: Fix 5461x LED 2011-11-23 19:07:55 -05:00
brocade
cadence net/cadence: enable by default NET_ATMEL 2011-11-16 17:33:50 -05:00
chelsio
cirrus
cisco
davicom dm9000: Fix check for disabled wake on LAN 2011-11-26 15:58:47 -05:00
dec
dlink
emulex
faraday
freescale net: fec: Select the FEC driver by default for i.MX SoCs 2011-11-30 17:07:21 -05:00
fujitsu
hp
i825xx
ibm ehea: Use round_jiffies_relative to align workqueue 2011-11-23 19:14:20 -05:00
icplus
intel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-11-07 10:55:33 -08:00
marvell sky2: fix hang in napi_disable 2011-11-17 21:43:57 -05:00
mellanox mlx4_en: Remove FCS bytes from packet length. 2011-11-14 14:25:36 -05:00
micrel
microchip
myricom
natsemi
neterion
nuvoton
nvidia forcedeth: fix stats on hardware without extended stats support 2011-11-14 00:14:39 -05:00
octeon
oki-semi pch_gbe: Move #include of module.h 2011-11-16 17:38:03 -05:00
packetengines
pasemi
qlogic qlge: fix size of external list for TX address descriptors 2011-11-23 19:10:00 -05:00
racal
rdc r6040: fix check against MCRO_HASHEN bit in r6040_multicast_list 2011-11-16 20:24:52 -05:00
realtek r8169: fix Rx index race between FIFO overflow recovery and NAPI handler. 2011-12-05 18:31:42 -05:00
renesas
seeq
sfc
sgi
silan
sis
smsc net/smsc911x: Always wait for the chip to be ready 2011-11-14 00:40:50 -05:00
stmicro stmmac: mask mmc interrupts 2011-11-21 15:31:15 -05:00
sun sunhme: Allow usage on SBI based SBus systems 2011-11-08 14:01:42 -05:00
tehuti
ti
tile
toshiba
tundra
via
xilinx net/ll_temac: FIX : Wait for indirect wait to end 2011-11-09 15:39:57 -05:00
xircom
xscale
dnet.c
dnet.h
ethoc.c
fealnx.c
jme.c jme: PHY configuration for compatible issue 2011-11-27 19:21:09 -05:00
jme.h jme: PHY configuration for compatible issue 2011-11-27 19:21:09 -05:00
Kconfig
korina.c
lantiq_etop.c NET: MIPS: lantiq: fix etop compile error 2011-11-14 14:34:54 -05:00
Makefile
mipsnet.c
netx-eth.c
s6gmac.c