linux/drivers/net/ethernet/intel/igb
Guilherme G Piccoli 69b97cf6db igb: re-assign hw address pointer on reset after PCI error
Whenever the igb driver detects the result of a read operation returns
a value composed only by F's (like 0xFFFFFFFF), it will detach the
net_device, clear the hw_addr pointer and warn to the user that adapter's
link is lost - those steps happen on igb_rd32().

In case a PCI error happens on Power architecture, there's a recovery
mechanism called EEH, that will reset the PCI slot and call driver's
handlers to reset the adapter and network functionality as well.

We observed that once hw_addr is NULL after the error is detected on
igb_rd32(), it's never assigned back, so in the process of resetting
the network functionality we got a NULL pointer dereference in both
igb_configure_tx_ring() and igb_configure_rx_ring(). In order to avoid
such bug, this patch re-assigns the hw_addr value in the slot_reset
handler.

Reported-by: Anthony H Thai <ahthai@us.ibm.com>
Reported-by: Harsha Thyagaraja <hathyaga@in.ibm.com>
Signed-off-by: Guilherme G Piccoli <gpiccoli@linux.vnet.ibm.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2017-01-06 02:18:51 -08:00
..
e1000_82575.c igb: reset the PHY before reading the PHY ID 2017-01-06 02:18:51 -08:00
e1000_82575.h igb: support RX flow classification by ethertype 2016-08-18 22:27:48 -07:00
e1000_defines.h ethernet/intel: use core min/max MTU checking 2016-10-18 11:34:18 -04:00
e1000_hw.h
e1000_i210.c
e1000_i210.h
e1000_mac.c igb: Realign bad indentation 2017-01-06 02:18:49 -08:00
e1000_mac.h
e1000_mbx.c igb: use BIT() macro or unsigned prefix 2016-05-13 14:39:47 -07:00
e1000_mbx.h
e1000_nvm.c igb: use BIT() macro or unsigned prefix 2016-05-13 14:39:47 -07:00
e1000_nvm.h
e1000_phy.c igb: Workaround for igb i210 firmware issue 2017-01-06 02:18:50 -08:00
e1000_phy.h igb: use BIT() macro or unsigned prefix 2016-05-13 14:39:47 -07:00
e1000_regs.h igb: correct register comments 2017-01-06 02:18:50 -08:00
igb.h igb: update code to better handle incrementing page count 2016-12-14 16:04:08 -08:00
igb_ethtool.c igb: fix non static symbol warning 2016-09-27 19:00:52 -07:00
igb_hwmon.c
igb_main.c igb: re-assign hw address pointer on reset after PCI error 2017-01-06 02:18:51 -08:00
igb_ptp.c clocksource: Use a plain u64 instead of cycle_t 2016-12-25 11:04:12 +01:00
Makefile