Patch "r8152: Add RTL8152_INACCESSIBLE to r8153_pre_firmware_1()" has been added to the 5.15-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

    r8152: Add RTL8152_INACCESSIBLE to r8153_pre_firmware_1()

to the 5.15-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:
     r8152-add-rtl8152_inaccessible-to-r8153_pre_firmware.patch
and it can be found in the queue-5.15 subdirectory.

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



commit d6e915daf4add035249c2b9bf49d54bc9ae79365
Author: Douglas Anderson <dianders@xxxxxxxxxxxx>
Date:   Wed Nov 29 13:25:23 2023 -0800

    r8152: Add RTL8152_INACCESSIBLE to r8153_pre_firmware_1()
    
    [ Upstream commit 8c53a7bd706535a9cf4e2ec3a4e8d61d46353ca0 ]
    
    Delay loops in r8152 should break out if RTL8152_INACCESSIBLE is set
    so that they don't delay too long if the device becomes
    inaccessible. Add the break to the loop in r8153_pre_firmware_1().
    
    Fixes: 9370f2d05a2a ("r8152: support request_firmware for RTL8153")
    Reviewed-by: Grant Grundler <grundler@xxxxxxxxxxxx>
    Signed-off-by: Douglas Anderson <dianders@xxxxxxxxxxxx>
    Acked-by: Hayes Wang <hayeswang@xxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index c4a3076bb2261..da3a2a5584a58 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -5520,6 +5520,8 @@ static int r8153_pre_firmware_1(struct r8152 *tp)
 	for (i = 0; i < 104; i++) {
 		u32 ocp_data = ocp_read_byte(tp, MCU_TYPE_USB, USB_WDT1_CTRL);
 
+		if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
+			return -ENODEV;
 		if (!(ocp_data & WTD1_EN))
 			break;
 		usleep_range(1000, 2000);




[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