USB: serial: option: add LongSung M5710 module support
Subsystems (2)
PATCH 1/1 USB: serial: option: add LongSung M5710 module support
Add a vendor id for LongSung and a product id for the M5710 module.
--- drivers/usb/serial/option.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/usb/serial/option.c +5 -0
@@ -560,6 +560,9 @@ static void option_instat_callback(struct urb *urb);#define WETELECOM_PRODUCT_6802 0x6802#define WETELECOM_PRODUCT_WMD300 0x6803 +/* LongSung */ +#define LONGSUNG_VENDOR_ID 0x2df3 +#define LONGSUNG_PRODUCT_M5710 0x9d03/* Device flags */
@@ -2060,6 +2063,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */ +/* LongSung devices */ + { USB_DEVICE(LONGSUNG_VENDOR_ID, LONGSUNG_PRODUCT_M5710) }, /* LongSung M5710 */ { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
Signature · 1 line
2.30.0.rc2
Johan Hovold
maintainerQuoted 12 lines · Daniel Palmer
Add a vendor id for LongSung and a product id for the M5710 module.
Signed-off-by Daniel Palmer <[email protected]>--- drivers/usb/serial/option.c | 5 +++++ 1 file changed, 5 insertions(+)drivers/usb/serial/option.c +0
-0
drivers/usb/serial/option.c static void option_instat_callback(struct urb *urb); · line 565
Quoted 6 lines
drivers/usb/serial/option.c +3
-0@@ -560,6 +560,9 @@ static void option_instat_callback(struct urb *urb);#define WETELECOM_PRODUCT_6802 0x6802#define WETELECOM_PRODUCT_WMD300 0x6803 +/* LongSung */ +#define LONGSUNG_VENDOR_ID 0x2df3 +#define LONGSUNG_PRODUCT_M5710 0x9d03
I'm trying to move away from adding such defines for new devices as they do not really add any value so I dropped them from the patch.
drivers/usb/serial/option.c static const struct usb_device_id option_ids[] = { · line 2070
Quoted 11 lines
drivers/usb/serial/option.c +2
-0/* Device flags */ @@ -2060,6 +2063,8 @@ static const struct usb_device_id option_ids[] = { { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) }, /* GosunCn GM500 RNDIS */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1405, 0xff) }, /* GosunCn GM500 MBIM */ { USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1406, 0xff) }, /* GosunCn GM500 ECM/NCM */ +/* LongSung devices */ + { USB_DEVICE(LONGSUNG_VENDOR_ID, LONGSUNG_PRODUCT_M5710) }, /* LongSung M5710 */ { } /* Terminating entry */ };MODULE_DEVICE_TABLE (usb, option_ids);
Also, would you mind posting the "lsusb -v" output for this device for reference? Do you know what each interface is used for?
I've applied this one locally, but I'll await your reply before pushing it out.
Johan
Hi Johan,
Quoted 2 lines · Johan Hovold
Also, would you mind posting the "lsusb -v" output for this device for reference?
The lsusb from busybox on this system doesn't support the -v option it seems. Here is the output from /sys/kernel/debug/usb/devices:
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2df3 ProdID=9d03 Rev= 1.00 S: Manufacturer=Marvell S: Product=Mobile Composite Device Bus S: SerialNumber=<snip>
C:* #Ifs= 5 Cfg#= 1 Atr=c0 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I can rebuild my rootfs with the usbutils lsusb tomorrow when I have physical access to it again if needed.
Quoted 1 line
Do you know what each interface is used for?
The second tty responds to AT commands. The others don't do anything so far. The hardware documentation doesn't say much aside that there is a usb interface.
Thanks,
Daniel
Johan Hovold
maintainerQuoted 35 lines · Daniel Palmer
Hi Johan,
Quoted 2 lines · Johan Hovold
Also, would you mind posting the "lsusb -v" output for this device for reference?
The lsusb from busybox on this system doesn't support the -v option it seems. Here is the output from
/sys/kernel/debug/usb/devices:T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 0 D: Ver= 2.00 Cls=ef(misc ) Sub=02 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=2df3 ProdID=9d03 Rev= 1.00 S: Manufacturer=Marvell S: Product=Mobile Composite Device Bus S: SerialNumber=<snip>C:* #Ifs= 5 Cfg#= 1 Atr=c0 MxPwr=500mA
A: FirstIf#= 0 IfCount= 2 Cls=e0(wlcon) Sub=01 Prot=03
I:* If#= 0 Alt= 0 #EPs= 1 Cls=e0(wlcon) Sub=01 Prot=03 Driver=rndis_host
E: Ad=87(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_hostE: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0c(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0b(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=89(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms E: Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0f(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms I:* If#= 5 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option E: Ad=88(I) Atr=03(Int.) MxPS= 64 Ivl=4096ms E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Quoted 2 lines
I can rebuild my rootfs with the usbutils lsusb tomorrow when I have physical access to it again if needed.
That's ok, the above will do just fine.
It looks like we must not try to bind to the first two interfaces however:
{ USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) }, /* LongSung M5710 */Quoted 4 lines
Quoted 1 line
Do you know what each interface is used for?
The second tty responds to AT commands. The others don't do anything so far. The hardware documentation doesn't say much aside that there is a usb interface.
Ok, thanks. I'll apply this one with the above change now.
Johan