Patch "net: usb: ax88179_178a: fix failed operations during ax88179_reset" has been added to the 5.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: usb: ax88179_178a: fix failed operations during ax88179_reset

to the 5.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-usb-ax88179_178a-fix-failed-operations-during-ax.patch
and it can be found in the queue-5.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 43064131abdf6010549695a4d83aefbd626108e6
Author: Jose Ignacio Tornos Martinez <jtornosm@xxxxxxxxxx>
Date:   Mon Nov 20 13:06:29 2023 +0100

    net: usb: ax88179_178a: fix failed operations during ax88179_reset
    
    [ Upstream commit 0739af07d1d947af27c877f797cb82ceee702515 ]
    
    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: e2ca90c276e1f ("ax88179_178a: ASIX AX88179_178A USB 3.0/2.0 to gigabit ethernet adapter driver")
    Reported-by: Herb Wei <weihao.bj@xxxxxxxxxxxxx>
    Tested-by: Herb Wei <weihao.bj@xxxxxxxxxxxxx>
    Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231120120642.54334-1-jtornosm@xxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/usb/ax88179_178a.c b/drivers/net/usb/ax88179_178a.c
index 79a53fe245e5c..38cb863ccb911 100644
--- a/drivers/net/usb/ax88179_178a.c
+++ b/drivers/net/usb/ax88179_178a.c
@@ -1700,11 +1700,11 @@ static int ax88179_reset(struct usbnet *dev)
 
 	*tmp16 = AX_PHYPWR_RSTCTL_IPRL;
 	ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_PHYPWR_RSTCTL, 2, 2, tmp16);
-	msleep(200);
+	msleep(500);
 
 	*tmp = AX_CLK_SELECT_ACS | AX_CLK_SELECT_BCS;
 	ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_CLK_SELECT, 1, 1, tmp);
-	msleep(100);
+	msleep(200);
 
 	/* Ethernet PHY Auto Detach*/
 	ax88179_auto_detach(dev, 0);



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux