realtek: reset both ethernet NIC and queues
authorSander Vanheule <sander@svanheule.net>
Thu, 18 Nov 2021 17:39:18 +0000 (18:39 +0100)
committerStijn Tintel <stijn@linux-ipv6.be>
Wed, 24 Nov 2021 19:38:43 +0000 (21:38 +0200)
commit72ae8314f5315e57caa82eb8c43f2606a7e6694c
treea99bda193d84ff916471346e47f1ee37bdfd2be1
parentf84053af5c0b0a159ea4d3e90b0c06574b4fde8d
realtek: reset both ethernet NIC and queues

Recent versions of Realtek's SDK reset both the ethernet NIC and queues
(SW_NIC_RST and SW_Q_RST bits) when initialising the hardware.

Furthermore, when issuing a CPU reset on the Zyxel GS1900-8 (not
supported by any current driver), the networking part of the SoC is not
reset. This leads to unresponsive network after the restart. By
resetting both the ethernet NIC and queues, networking always comes up
reliably.

Suggested-by: Birger Koblitz <mail@birger-koblitz.de>
Signed-off-by: Sander Vanheule <sander@svanheule.net>
Tested-by: Stijn Tintel <stijn@linux-ipv6.be>
target/linux/realtek/files-5.10/drivers/net/ethernet/rtl838x_eth.c