Skip to contentSkip to conversation

r8152: fix unknown device for choose_configuration

PATCH Applied Hayes Wang 2 participants 2 messages Mar 8, 2024 – Mar 11, 2024

Subsystems (4)
lore
Share & tools
lore

Hayes Wang

author
#0 lore raw

PATCH 1/1 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 aa4f2b3e418e ("r8152: Choose our USB config with choose_configuration() rather than probe()")
---
 drivers/net/usb/r8152.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/usb/r8152.c +1 -1
index 0d0672d2a654..51fe00c2b896 100644
@@ -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;
Signature · 1 line
2.43.0
#1 lore raw
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Fri, 8 Mar 2024 15:52:06 +0800 you wrote:

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()")

[...]

Here is the summary with links:
- [net] r8152: fix unknown device for choose_configuration

    https://git.kernel.org/netdev/net/c/46590b545df6

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html