r8169: reset bus if NIC isn't accessible after tx timeout
authorHeiner Kallweit <hkallweit1@gmail.com>
Fri, 13 Jan 2023 22:46:19 +0000 (23:46 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Jan 2023 13:38:28 +0000 (13:38 +0000)
commitce870af39558448dcfabef7114b9aa389f3f895a
tree408faa00d371d55ca3edcd8360735e9cb92d34f0
parent9627c981ac82209c66c1b6c0e15c6cceb8656f01
r8169: reset bus if NIC isn't accessible after tx timeout

ASPM issues may result in the NIC not being accessible any longer.
In this case disabling ASPM may not work. Therefore detect this case
by checking whether register reads return ~0, and try to make the
NIC accessible again by resetting the secondary bus.

v2:
- add exception handling for the case that pci_reset_bus() fails

Suggested-by: Alexander Duyck <alexander.duyck@gmail.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169_main.c