r8169: fix Rx index race between FIFO overflow recovery and NAPI handler.
Since 92fc43b4159b518f5baae57301f26d770b0834c9, rtl8169_tx_timeout ends up
resetting Rx and Tx indexes and thus racing with the NAPI handler via
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:
Helper for rtl8169_close. rtl8169_open explicitely inits the indexes
Indexes are set by rtl8169_reinit_task.
rtl8169_hw_reset is needed when the device goes down. See 1.
System shutdown handler. Indexes are irrelevant.
Indexes must be set before rtl_hw_start is called.
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 <firstname.lastname@example.org>
Cc: hayeswang <email@example.com>
Signed-off-by: David S. Miller <firstname.lastname@example.org>
1 file changed