summaryrefslogtreecommitdiff
path: root/drivers/of
diff options
context:
space:
mode:
authorGuilherme G Piccoli <gpiccoli@linux.vnet.ibm.com>2016-11-10 18:46:43 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-08 08:26:03 (GMT)
commitbc438831606acd445bad9f7df20ac6ce87d5b490 (patch)
treef74d399fb3935be71870d7c457b7373928430c6a /drivers/of
parent484e3e7934491fc0a2e72951d3a6eec24d0ad0da (diff)
downloadlinux-bc438831606acd445bad9f7df20ac6ce87d5b490.tar.xz
igb: re-assign hw address pointer on reset after PCI error
[ Upstream commit 69b97cf6dbce7403845a28bbc75d57f5be7b12ac ] 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> Signed-off-by: Sasha Levin <alexander.levin@verizon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/of')
0 files changed, 0 insertions, 0 deletions