linux_dsm_epyc7002/drivers/net/ethernet/intel/e1000
Vincenzo Maffione 44c445c3d1 e1000: fix race condition between e1000_down() and e1000_watchdog
This patch fixes a race condition that can result into the interface being
up and carrier on, but with transmits disabled in the hardware.
The bug may show up by repeatedly IFF_DOWN+IFF_UP the interface, which
allows e1000_watchdog() interleave with e1000_down().

    CPU x                           CPU y
    --------------------------------------------------------------------
    e1000_down():
        netif_carrier_off()
                                    e1000_watchdog():
                                        if (carrier == off) {
                                            netif_carrier_on();
                                            enable_hw_transmit();
                                        }
        disable_hw_transmit();
                                    e1000_watchdog():
                                        /* carrier on, do nothing */

Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2017-10-26 07:42:57 -07:00
..
e1000_ethtool.c e1000: use new API ethtool_{get|set}_link_ksettings 2017-03-21 15:27:58 -07:00
e1000_hw.c e1000: Elementary checkpatch warnings and checks removed 2015-12-12 23:13:52 -08:00
e1000_hw.h e1000: move e1000_tbi_adjust_stats to where its used 2014-09-12 00:51:10 -07:00
e1000_main.c e1000: fix race condition between e1000_down() and e1000_watchdog 2017-10-26 07:42:57 -07:00
e1000_osdep.h
e1000_param.c e1000: fix whitespace issues and multi-line comments 2013-02-15 21:46:37 -08:00
e1000.h e1000: call ndo_stop() instead of dev_close() when running offline selftest 2016-04-06 14:47:55 -07:00
Makefile