* [PATCH net] r8152: fix unknown device for choose_configuration
@ 2024-03-08 7:52 Hayes Wang
2024-03-11 23:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Hayes Wang @ 2024-03-08 7:52 UTC (permalink / raw)
To: kuba, davem; +Cc: netdev, nic_swsd, linux-kernel, linux-usb, Hayes Wang
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@realtek.com>
---
drivers/net/usb/r8152.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 0d0672d2a654..51fe00c2b896 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;
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] r8152: fix unknown device for choose_configuration
2024-03-08 7:52 [PATCH net] r8152: fix unknown device for choose_configuration Hayes Wang
@ 2024-03-11 23:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-11 23:00 UTC (permalink / raw)
To: Hayes Wang; +Cc: kuba, davem, netdev, nic_swsd, linux-kernel, linux-usb
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
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()")
> Signed-off-by: Hayes Wang <hayeswang@realtek.com>
>
> [...]
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!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-11 23:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-08 7:52 [PATCH net] r8152: fix unknown device for choose_configuration Hayes Wang
2024-03-11 23:00 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).