* [PATCH] drv/usb: Fix the issue with Realtek USB wireless adapter AC650
@ 2024-06-25 7:07 tuhaowen
2024-06-25 13:36 ` Alan Stern
2024-06-25 14:22 ` Lars Melin
0 siblings, 2 replies; 3+ messages in thread
From: tuhaowen @ 2024-06-25 7:07 UTC (permalink / raw)
To: stern, gregkh; +Cc: linux-usb, usb-storage, linux-kernel, wangyuli, tuhaowen
Due to the dual-mode functionality of the Realtek USB wireless
adapter AC650, it initially presents itself as a flash drive
before the driver is installed.
In Linux, multi-state devices are recognized as storage devices
on startup because the driver has not yet been loaded.
As a result, the AC650 is identified as a DISK device at boot,
preventing the use of its WLAN mode. The issue can only be
resolved by unplugging and replugging the adapter.
Signed-off-by: tuhaowen <tuhaowen@uniontech.com>
---
drivers/usb/storage/unusual_devs.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
index fd68204374f2..f660d3e52436 100644
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1487,6 +1487,12 @@ UNUSUAL_DEV( 0x0bc2, 0x3332, 0x0000, 0x9999,
USB_SC_DEVICE, USB_PR_DEVICE, NULL,
US_FL_NO_WP_DETECT ),
+UNUSUAL_DEV(0x0bda, 0x1a2b, 0x0000, 0x9999,
+ "Realtek",
+ "USB Network Device",
+ USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+ US_FL_IGNORE_DEVICE),
+
UNUSUAL_DEV( 0x0d49, 0x7310, 0x0000, 0x9999,
"Maxtor",
"USB to SATA",
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drv/usb: Fix the issue with Realtek USB wireless adapter AC650
2024-06-25 7:07 [PATCH] drv/usb: Fix the issue with Realtek USB wireless adapter AC650 tuhaowen
@ 2024-06-25 13:36 ` Alan Stern
2024-06-25 14:22 ` Lars Melin
1 sibling, 0 replies; 3+ messages in thread
From: Alan Stern @ 2024-06-25 13:36 UTC (permalink / raw)
To: tuhaowen; +Cc: gregkh, linux-usb, usb-storage, linux-kernel, wangyuli
On Tue, Jun 25, 2024 at 03:07:24PM +0800, tuhaowen wrote:
> Due to the dual-mode functionality of the Realtek USB wireless
> adapter AC650, it initially presents itself as a flash drive
> before the driver is installed.
Does this flash-drive mode have a real purpose? For instance, can
people upload new firmware by writing it to the flash drive? I can't
imagine that the manufacturer would have implemented the dual-mode
functionality for no reason at all.
> In Linux, multi-state devices are recognized as storage devices
> on startup because the driver has not yet been loaded.
>
> As a result, the AC650 is identified as a DISK device at boot,
> preventing the use of its WLAN mode. The issue can only be
> resolved by unplugging and replugging the adapter.
If there's no way to resolve this issue other than by unplugging and
replugging the adapter, how can a patch help?
Are you sure that the problem can't be solved by a userspace helper,
such as the usbmodeswitch program?
Alan Stern
> Signed-off-by: tuhaowen <tuhaowen@uniontech.com>
> ---
> drivers/usb/storage/unusual_devs.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/storage/unusual_devs.h b/drivers/usb/storage/unusual_devs.h
> index fd68204374f2..f660d3e52436 100644
> --- a/drivers/usb/storage/unusual_devs.h
> +++ b/drivers/usb/storage/unusual_devs.h
> @@ -1487,6 +1487,12 @@ UNUSUAL_DEV( 0x0bc2, 0x3332, 0x0000, 0x9999,
> USB_SC_DEVICE, USB_PR_DEVICE, NULL,
> US_FL_NO_WP_DETECT ),
>
> +UNUSUAL_DEV(0x0bda, 0x1a2b, 0x0000, 0x9999,
> + "Realtek",
> + "USB Network Device",
> + USB_SC_DEVICE, USB_PR_DEVICE, NULL,
> + US_FL_IGNORE_DEVICE),
> +
> UNUSUAL_DEV( 0x0d49, 0x7310, 0x0000, 0x9999,
> "Maxtor",
> "USB to SATA",
> --
> 2.20.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drv/usb: Fix the issue with Realtek USB wireless adapter AC650
2024-06-25 7:07 [PATCH] drv/usb: Fix the issue with Realtek USB wireless adapter AC650 tuhaowen
2024-06-25 13:36 ` Alan Stern
@ 2024-06-25 14:22 ` Lars Melin
1 sibling, 0 replies; 3+ messages in thread
From: Lars Melin @ 2024-06-25 14:22 UTC (permalink / raw)
To: tuhaowen, stern, gregkh; +Cc: linux-usb, usb-storage, linux-kernel, wangyuli
On 2024-06-25 14:07, tuhaowen wrote:
> Due to the dual-mode functionality of the Realtek USB wireless
> adapter AC650, it initially presents itself as a flash drive
> before the driver is installed.
>
> In Linux, multi-state devices are recognized as storage devices
> on startup because the driver has not yet been loaded.
>
> As a result, the AC650 is identified as a DISK device at boot,
> preventing the use of its WLAN mode. The issue can only be
> resolved by unplugging and replugging the adapter.
>
It can be resolved by manually ejecting the created cdrom drive or by
using usb_modeswitch which will eject the drive as soon as it is
detected. No need for unplugging/replugging.
thanks
Lars
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-06-25 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-25 7:07 [PATCH] drv/usb: Fix the issue with Realtek USB wireless adapter AC650 tuhaowen
2024-06-25 13:36 ` Alan Stern
2024-06-25 14:22 ` Lars Melin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®