linux/drivers/net
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
..
appletalk
arcnet net: Revert ARCNET and PHYLIB to tristate options 2011-11-26 14:36:49 -05:00
bonding bonding: only use primary address for ARP 2011-11-30 22:59:11 -05:00
caif caif-hsi: Added recovery check of CA wake status. 2011-10-19 03:25:43 -04:00
can net, sja1000: Don't include version.h in peak_pci.c when not needed 2011-11-21 16:43:53 -05:00
cris
ethernet r8169: fix Rx index race between FIFO overflow recovery and NAPI handler. 2011-12-05 18:31:42 -05:00
fddi
hamradio
hippi net: drivers/net/hippi/Kconfig should be sourced 2011-11-09 15:55:06 -05:00
irda Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2011-11-03 13:28:14 -07:00
phy net: Revert ARCNET and PHYLIB to tristate options 2011-11-26 14:36:49 -05:00
plip
ppp Merge branch 'master' of ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2011-10-24 18:18:09 -04:00
slip
tokenring
usb net-next:asix: V2 Update VERSION 2011-11-15 16:26:07 -05:00
vmxnet3 drivers/net: Add module.h to drivers who were implicitly using it 2011-10-31 19:31:07 -04:00
wan
wimax drivers/net: Add moduleparam.h to drivers as required. 2011-10-31 19:31:09 -04:00
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2011-12-05 11:05:44 -05:00
xen-netback xen-netback: use correct index for invalidation in xen_netbk_tx_check_gop() 2011-11-21 15:32:15 -05:00
dummy.c
eql.c
ifb.c
Kconfig net: drivers/net/hippi/Kconfig should be sourced 2011-11-09 15:55:06 -05:00
LICENSE.SRC
loopback.c
macvlan.c macvlan: receive multicast with local address 2011-11-04 17:39:32 -04:00
macvtap.c macvtap: Fix the minor device number allocation 2011-10-21 02:53:07 -04:00
Makefile
mdio.c
mii.c
netconsole.c netconsole: enable netconsole can make net_device refcnt incorrent 2011-10-18 23:55:29 -04:00
rionet.c drivers/net/rionet.c: fix ethernet address macros for LE platforms 2011-11-02 16:07:01 -07:00
sb1000.c
Space.c
sungem_phy.c
tun.c
veth.c drivers/net: Add module.h to drivers who were implicitly using it 2011-10-31 19:31:07 -04:00
virtio_net.c virtio-net: Use virtio_config_val() for retrieving config 2011-11-02 11:40:58 +10:30
xen-netfront.c net: add skb frag size accessors 2011-10-19 03:10:46 -04:00