Patch "r8152: fix unknown device for choose_configuration" has been added to the 6.8-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: fix unknown device for choose_configuration

to the 6.8-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-fix-unknown-device-for-choose_configuration.patch
and it can be found in the queue-6.8 subdirectory.

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



commit deb2c6e934137783c8dcdc5b3b67c2be3ceaa79d
Author: Hayes Wang <hayeswang@xxxxxxxxxxx>
Date:   Fri Mar 8 15:52:06 2024 +0800

    r8152: fix unknown device for choose_configuration
    
    [ Upstream commit 46590b545df636aea0f9f7f2100d9963c0af5824 ]
    
    For the unknown device, rtl8152_cfgselector_choose_configuration()
    should return a negative value. Then, usb_choose_configuration() would
    set a configuration for CDC ECM or NCM mode. Otherwise, there is no
    usb interface driver for the device.
    
    Fixes: aa4f2b3e418e ("r8152: Choose our USB config with choose_configuration() rather than probe()")
    Signed-off-by: Hayes Wang <hayeswang@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240308075206.33553-436-nic_swsd@xxxxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 0d0672d2a6545..51fe00c2b896e 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -10078,7 +10078,7 @@ static int rtl8152_cfgselector_choose_configuration(struct usb_device *udev)
 	 * driver supports it.
 	 */
 	if (__rtl_get_hw_ver(udev) == RTL_VER_UNKNOWN)
-		return 0;
+		return -ENODEV;
 
 	/* The vendor mode is not always config #1, so to find it out. */
 	c = udev->config;




[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