Skip to content

Commit 0739af0

Browse files
jtornosmkuba-moo
authored andcommitted
net: usb: ax88179_178a: fix failed operations during ax88179_reset
Using generic ASIX Electronics Corp. AX88179 Gigabit Ethernet device, the following test cycle has been implemented: - power on - check logs - shutdown - after detecting the system shutdown, disconnect power - after approximately 60 seconds of sleep, power is restored Running some cycles, sometimes error logs like this appear: kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to write reg index 0x0001: -19 kernel: ax88179_178a 2-9:1.0 (unnamed net_device) (uninitialized): Failed to read reg index 0x0001: -19 ... These failed operation are happening during ax88179_reset execution, so the initialization could not be correct. In order to avoid this, we need to increase the delay after reset and clock initial operations. By using these larger values, many cycles have been run and no failed operations appear. It would be better to check some status register to verify when the operation has finished, but I do not have found any available information (neither in the public datasheets nor in the manufacturer's driver). The only available information for the necessary delays is the maufacturer's driver (original values) but the proposed values are not enough for the tested devices. Fixes: e2ca90c ("ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver") Reported-by: Herb Wei <[email protected]> Tested-by: Herb Wei <[email protected]> Signed-off-by: Jose Ignacio Tornos Martinez <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 9c6dc13 commit 0739af0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/usb/ax88179_178a.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,11 +1583,11 @@ static int ax88179_reset(struct usbnet *dev)
15831583

15841584
*tmp16 = AX_PHYPWR_RSTCTL_IPRL;
15851585
ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_PHYPWR_RSTCTL, 2, 2, tmp16);
1586-
msleep(200);
1586+
msleep(500);
15871587

15881588
*tmp = AX_CLK_SELECT_ACS | AX_CLK_SELECT_BCS;
15891589
ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_CLK_SELECT, 1, 1, tmp);
1590-
msleep(100);
1590+
msleep(200);
15911591

15921592
/* Ethernet PHY Auto Detach*/
15931593
ax88179_auto_detach(dev);

0 commit comments

Comments
 (0)