Commit 46590b54 authored by Hayes Wang's avatar Hayes Wang Committed by Jakub Kicinski

r8152: fix unknown device for choose_configuration

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: aa4f2b3e ("r8152: Choose our USB config with choose_configuration() rather than probe()")
Signed-off-by: default avatarHayes Wang <hayeswang@realtek.com>
Link: https://lore.kernel.org/r/20240308075206.33553-436-nic_swsd@realtek.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 8f4cd89b
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment