Patch "r8152: Add RTL8152_INACCESSIBLE to r8156b_wait_loading_flash()" 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 r8156b_wait_loading_flash()

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-r8156b_wait_loadin.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 16f43727cb635006355a694b6784fa493e768b22
Author: Douglas Anderson <dianders@xxxxxxxxxxxx>
Date:   Wed Nov 29 13:25:22 2023 -0800

    r8152: Add RTL8152_INACCESSIBLE to r8156b_wait_loading_flash()
    
    [ Upstream commit 8a67b47fced9f6a84101eb9ec5ce4c7d64204bc7 ]
    
    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
    r8156b_wait_loading_flash().
    
    Fixes: 195aae321c82 ("r8152: support new chips")
    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 1bb304857a744..c4a3076bb2261 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -5396,6 +5396,8 @@ static void r8156b_wait_loading_flash(struct r8152 *tp)
 		int i;
 
 		for (i = 0; i < 100; i++) {
+			if (test_bit(RTL8152_INACCESSIBLE, &tp->flags))
+				break;
 			if (ocp_read_word(tp, MCU_TYPE_USB, USB_GPHY_CTRL) & GPHY_PATCH_DONE)
 				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