* [PATCH] USB: serial: option: add UNISOC vendor and TOZED LT70C product
@ 2023-04-06 5:50 arinc9.unal
2023-04-13 15:14 ` Johan Hovold
0 siblings, 1 reply; 5+ messages in thread
From: arinc9.unal @ 2023-04-06 5:50 UTC (permalink / raw)
To: Johan Hovold, Greg Kroah-Hartman
Cc: Arınç ÜNAL, Bjørn Mork, me, erkin.bozoglu,
linux-usb, linux-kernel
From: Arınç ÜNAL <arinc.unal@arinc9.com>
Add UNISOC vendor ID and TOZED LT70-C modem which is based from UNISOC
SL8563. The modem supports the NCM mode.
T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1782 ProdID=4055 Rev=04.04
S: Manufacturer=Unisoc Phone
S: Product=Unisoc Phone
S: SerialNumber=<redacted>
C: #Ifs=14 Cfg#= 1 Atr=c0 MxPwr=500mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#=10 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#=11 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#=12 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=option
E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#=13 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
E: Ad=84(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
I: If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
E: Ad=86(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
E: Ad=88(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
I: If#= 7 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
Bus 001 Device 002: ID 1782:4055 Unisoc Phone Unisoc Phone
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1782
idProduct 0x4055
bcdDevice 4.04
iManufacturer 1 Unisoc Phone
iProduct 2 Unisoc Phone
iSerial 3 <redacted>
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x01e7
bNumInterfaces 14
bConfigurationValue 1
iConfiguration 4 4ncm
bmAttributes 0xc0
Self Powered
MaxPower 500mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2
bFunctionSubClass 13
bFunctionProtocol 0
iFunction 8 CDC NCM
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2
bInterfaceSubClass 13
bInterfaceProtocol 0
iInterface 5 CDC Network Control Model (NCM)
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 0
bSlaveInterface 1
CDC Ethernet:
iMacAddress 6 <redacted>
bmEthernetStatistics 0x00000000
wMaxSegmentSize 1514
wNumberMCFilters 0x0000
bNumberPowerFilters 0
CDC NCM:
bcdNcmVersion 1.00
bmNetworkCapabilities 0x11
crc mode
packet filter
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 7 CDC Network Data
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 7 CDC Network Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 2
bInterfaceCount 2
bFunctionClass 2
bFunctionSubClass 13
bFunctionProtocol 0
iFunction 13 CDC NCM
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2
bInterfaceSubClass 13
bInterfaceProtocol 0
iInterface 10 CDC Network Control Model (NCM)
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 2
bSlaveInterface 3
CDC Ethernet:
iMacAddress 11 <redacted>
bmEthernetStatistics 0x00000000
wMaxSegmentSize 1514
wNumberMCFilters 0x0000
bNumberPowerFilters 0
CDC NCM:
bcdNcmVersion 1.00
bmNetworkCapabilities 0x11
crc mode
packet filter
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 12 CDC Network Data
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 12 CDC Network Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 4
bInterfaceCount 2
bFunctionClass 2
bFunctionSubClass 13
bFunctionProtocol 0
iFunction 18 CDC NCM
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2
bInterfaceSubClass 13
bInterfaceProtocol 0
iInterface 15 CDC Network Control Model (NCM)
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 4
bSlaveInterface 5
CDC Ethernet:
iMacAddress 16 <redacted>
bmEthernetStatistics 0x00000000
wMaxSegmentSize 1514
wNumberMCFilters 0x0000
bNumberPowerFilters 0
CDC NCM:
bcdNcmVersion 1.00
bmNetworkCapabilities 0x11
crc mode
packet filter
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x86 EP 6 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 5
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 17 CDC Network Data
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 5
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 17 CDC Network Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 6
bInterfaceCount 2
bFunctionClass 2
bFunctionSubClass 13
bFunctionProtocol 0
iFunction 23 CDC NCM
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 6
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2
bInterfaceSubClass 13
bInterfaceProtocol 0
iInterface 20 CDC Network Control Model (NCM)
CDC Header:
bcdCDC 1.10
CDC Union:
bMasterInterface 6
bSlaveInterface 7
CDC Ethernet:
iMacAddress 21 <redacted>
bmEthernetStatistics 0x00000000
wMaxSegmentSize 1514
wNumberMCFilters 0x0000
bNumberPowerFilters 0
CDC NCM:
bcdNcmVersion 1.00
bmNetworkCapabilities 0x11
crc mode
packet filter
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x88 EP 8 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 7
bAlternateSetting 0
bNumEndpoints 0
bInterfaceClass 10
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 22 CDC Network Data
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 7
bAlternateSetting 1
bNumEndpoints 2
bInterfaceClass 10
bInterfaceSubClass 0
bInterfaceProtocol 1
iInterface 22 CDC Network Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x87 EP 7 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x04 EP 4 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 8
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x89 EP 9 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x05 EP 5 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 9
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8a EP 10 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x06 EP 6 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 10
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8b EP 11 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x07 EP 7 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 11
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8c EP 12 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x08 EP 8 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 12
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255
bInterfaceSubClass 66
bInterfaceProtocol 1
iInterface 26 ADB Interface
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x09 EP 9 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8d EP 13 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 13
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x8e EP 14 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x0a EP 10 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 0
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0000
(Bus Powered)
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
I did not receive any comments on RFC so I'm sending this as is.
Arınç
---
drivers/usb/serial/option.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index f31cc3c76329..65a050a9ca39 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -595,6 +595,11 @@ static void option_instat_callback(struct urb *urb);
#define SIERRA_VENDOR_ID 0x1199
#define SIERRA_PRODUCT_EM9191 0x90d3
+/* UNISOC (Spreadtrum) products */
+#define UNISOC_VENDOR_ID 0x1782
+/* TOZED TL70-C based on UNISOC SL8563 uses UNISOC's vendor ID */
+#define TOZED_PRODUCT_LT70C 0x4055
+
/* Device flags */
/* Highest interface number which can be used with NCTRL() and RSVD() */
@@ -2225,6 +2230,7 @@ static const struct usb_device_id option_ids[] = {
{ USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
{ USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
+ { USB_DEVICE(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, option_ids);
--
2.37.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] USB: serial: option: add UNISOC vendor and TOZED LT70C product
2023-04-06 5:50 [PATCH] USB: serial: option: add UNISOC vendor and TOZED LT70C product arinc9.unal
@ 2023-04-13 15:14 ` Johan Hovold
2023-04-17 10:42 ` Arınç ÜNAL
0 siblings, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2023-04-13 15:14 UTC (permalink / raw)
To: arinc9.unal
Cc: Greg Kroah-Hartman, Arınç ÜNAL, Bjørn Mork,
me, erkin.bozoglu, linux-usb, linux-kernel
On Thu, Apr 06, 2023 at 08:50:04AM +0300, arinc9.unal@gmail.com wrote:
> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>
> Add UNISOC vendor ID and TOZED LT70-C modem which is based from UNISOC
> SL8563. The modem supports the NCM mode.
Thanks for the patch. Looks mostly good, but see my comments below.
> T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=480 MxCh= 0
> D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
> P: Vendor=1782 ProdID=4055 Rev=04.04
> S: Manufacturer=Unisoc Phone
> S: Product=Unisoc Phone
> S: SerialNumber=<redacted>
> C: #Ifs=14 Cfg#= 1 Atr=c0 MxPwr=500mA
> I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
> E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
> I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#=10 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#=11 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#=12 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=option
> E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
This looks like an ADB interface which should be blacklisted (reserved)
so that the driver does not bind to it.
> I: If#=13 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#= 2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
> E: Ad=84(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
> I: If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
> E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
> E: Ad=86(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
> I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
> E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#= 6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
> E: Ad=88(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
> I: If#= 7 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
> E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>
> Bus 001 Device 002: ID 1782:4055 Unisoc Phone Unisoc Phone
> Device Descriptor:
> bLength 18
> bDescriptorType 1
> bcdUSB 2.00
> bDeviceClass 0
> bDeviceSubClass 0
> bDeviceProtocol 0
> bMaxPacketSize0 64
> idVendor 0x1782
> idProduct 0x4055
> bcdDevice 4.04
> iManufacturer 1 Unisoc Phone
> iProduct 2 Unisoc Phone
> iSerial 3 <redacted>
> bNumConfigurations 1
When resending you can put the verbose lsusb output below the cut-off
line (---) so that we have it in the mail archives if ever needed.
Could you also add something what the various serial interfaces are used
for?
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>
> I did not receive any comments on RFC so I'm sending this as is.
>
> Arınç
>
> ---
> drivers/usb/serial/option.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index f31cc3c76329..65a050a9ca39 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -595,6 +595,11 @@ static void option_instat_callback(struct urb *urb);
> #define SIERRA_VENDOR_ID 0x1199
> #define SIERRA_PRODUCT_EM9191 0x90d3
>
> +/* UNISOC (Spreadtrum) products */
> +#define UNISOC_VENDOR_ID 0x1782
> +/* TOZED TL70-C based on UNISOC SL8563 uses UNISOC's vendor ID */
> +#define TOZED_PRODUCT_LT70C 0x4055
> +
> /* Device flags */
>
> /* Highest interface number which can be used with NCTRL() and RSVD() */
> @@ -2225,6 +2230,7 @@ static const struct usb_device_id option_ids[] = {
> { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
> { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
> { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
> + { USB_DEVICE(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C) },
You should match also on the interface class so that you don't try to
bind to the cdc interfaces. See USB_DEVICE_INTERFACE_CLASS() (and
RSVD() for the ADB interface).
> { } /* Terminating entry */
> };
> MODULE_DEVICE_TABLE(usb, option_ids);
Johan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] USB: serial: option: add UNISOC vendor and TOZED LT70C product
2023-04-13 15:14 ` Johan Hovold
@ 2023-04-17 10:42 ` Arınç ÜNAL
2023-04-17 14:19 ` Johan Hovold
0 siblings, 1 reply; 5+ messages in thread
From: Arınç ÜNAL @ 2023-04-17 10:42 UTC (permalink / raw)
To: Johan Hovold
Cc: Greg Kroah-Hartman, Bjørn Mork, me, erkin.bozoglu, linux-usb,
linux-kernel
On 13.04.2023 18:14, Johan Hovold wrote:
> On Thu, Apr 06, 2023 at 08:50:04AM +0300, arinc9.unal@gmail.com wrote:
>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>
>> Add UNISOC vendor ID and TOZED LT70-C modem which is based from UNISOC
>> SL8563. The modem supports the NCM mode.
>
> Thanks for the patch. Looks mostly good, but see my comments below.
Thanks a lot for looking at this Johan!
>
>> T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=480 MxCh= 0
>> D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
>> P: Vendor=1782 ProdID=4055 Rev=04.04
>> S: Manufacturer=Unisoc Phone
>> S: Product=Unisoc Phone
>> S: SerialNumber=<redacted>
>> C: #Ifs=14 Cfg#= 1 Atr=c0 MxPwr=500mA
>> I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
>> E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
>> I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
>> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> I: If#=10 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> I: If#=11 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> I: If#=12 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=option
>> E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>
> This looks like an ADB interface which should be blacklisted (reserved)
> so that the driver does not bind to it.
Will do.
>
>> I: If#=13 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> I: If#= 2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
>> E: Ad=84(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
>> I: If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
>> E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
>> E: Ad=86(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
>> I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
>> E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> I: If#= 6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
>> E: Ad=88(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
>> I: If#= 7 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
>> E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>> E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>
>> Bus 001 Device 002: ID 1782:4055 Unisoc Phone Unisoc Phone
>> Device Descriptor:
>> bLength 18
>> bDescriptorType 1
>> bcdUSB 2.00
>> bDeviceClass 0
>> bDeviceSubClass 0
>> bDeviceProtocol 0
>> bMaxPacketSize0 64
>> idVendor 0x1782
>> idProduct 0x4055
>> bcdDevice 4.04
>> iManufacturer 1 Unisoc Phone
>> iProduct 2 Unisoc Phone
>> iSerial 3 <redacted>
>> bNumConfigurations 1
>
> When resending you can put the verbose lsusb output below the cut-off
> line (---) so that we have it in the mail archives if ever needed.
Will do.
>
> Could you also add something what the various serial interfaces are used
> for?
Me and Conan only know the first interface which is where the AT
commands are run. I will mention this and the ADB interface on v2.
>
>> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
>> ---
>>
>> I did not receive any comments on RFC so I'm sending this as is.
>>
>> Arınç
>>
>> ---
>> drivers/usb/serial/option.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
>> index f31cc3c76329..65a050a9ca39 100644
>> --- a/drivers/usb/serial/option.c
>> +++ b/drivers/usb/serial/option.c
>> @@ -595,6 +595,11 @@ static void option_instat_callback(struct urb *urb);
>> #define SIERRA_VENDOR_ID 0x1199
>> #define SIERRA_PRODUCT_EM9191 0x90d3
>>
>> +/* UNISOC (Spreadtrum) products */
>> +#define UNISOC_VENDOR_ID 0x1782
>> +/* TOZED TL70-C based on UNISOC SL8563 uses UNISOC's vendor ID */
>> +#define TOZED_PRODUCT_LT70C 0x4055
>> +
>> /* Device flags */
>>
>> /* Highest interface number which can be used with NCTRL() and RSVD() */
>> @@ -2225,6 +2230,7 @@ static const struct usb_device_id option_ids[] = {
>> { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
>> { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
>> { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
>> + { USB_DEVICE(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C) },
>
> You should match also on the interface class so that you don't try to
> bind to the cdc interfaces. See USB_DEVICE_INTERFACE_CLASS() (and
> RSVD() for the ADB interface).
Thanks, the final result should look like this:
{ USB_DEVICE_INTERFACE_CLASS(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff),
.driver_info = RSVD(12) },
Arınç
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] USB: serial: option: add UNISOC vendor and TOZED LT70C product
2023-04-17 10:42 ` Arınç ÜNAL
@ 2023-04-17 14:19 ` Johan Hovold
2023-04-17 15:08 ` Arınç ÜNAL
0 siblings, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2023-04-17 14:19 UTC (permalink / raw)
To: Arınç ÜNAL
Cc: Greg Kroah-Hartman, Bjørn Mork, me, erkin.bozoglu, linux-usb,
linux-kernel
On Mon, Apr 17, 2023 at 01:42:05PM +0300, Arınç ÜNAL wrote:
> On 13.04.2023 18:14, Johan Hovold wrote:
> > On Thu, Apr 06, 2023 at 08:50:04AM +0300, arinc9.unal@gmail.com wrote:
> >> From: Arınç ÜNAL <arinc.unal@arinc9.com>
> >>
> >> Add UNISOC vendor ID and TOZED LT70-C modem which is based from UNISOC
> >> SL8563. The modem supports the NCM mode.
> >
> > Thanks for the patch. Looks mostly good, but see my comments below.
>
> Thanks a lot for looking at this Johan!
>
> >
> >> T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=480 MxCh= 0
> >> D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
> >> P: Vendor=1782 ProdID=4055 Rev=04.04
> >> S: Manufacturer=Unisoc Phone
> >> S: Product=Unisoc Phone
> >> S: SerialNumber=<redacted>
> >> C: #Ifs=14 Cfg#= 1 Atr=c0 MxPwr=500mA
> >> I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
> >> E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
> >> I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
> >> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> I: If#=10 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> I: If#=11 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> I: If#=12 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=option
> >> E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >
> > This looks like an ADB interface which should be blacklisted (reserved)
> > so that the driver does not bind to it.
>
> Will do.
>
> >
> >> I: If#=13 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> I: If#= 2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
> >> E: Ad=84(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
> >> I: If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
> >> E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
> >> E: Ad=86(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
> >> I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
> >> E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> I: If#= 6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
> >> E: Ad=88(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
> >> I: If#= 7 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
> >> E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
> >> ---
> >> drivers/usb/serial/option.c | 6 ++++++
> >> 1 file changed, 6 insertions(+)
> >>
> >> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> >> index f31cc3c76329..65a050a9ca39 100644
> >> --- a/drivers/usb/serial/option.c
> >> +++ b/drivers/usb/serial/option.c
> >> @@ -595,6 +595,11 @@ static void option_instat_callback(struct urb *urb);
> >> #define SIERRA_VENDOR_ID 0x1199
> >> #define SIERRA_PRODUCT_EM9191 0x90d3
> >>
> >> +/* UNISOC (Spreadtrum) products */
> >> +#define UNISOC_VENDOR_ID 0x1782
> >> +/* TOZED TL70-C based on UNISOC SL8563 uses UNISOC's vendor ID */
> >> +#define TOZED_PRODUCT_LT70C 0x4055
> >> +
> >> /* Device flags */
> >>
> >> /* Highest interface number which can be used with NCTRL() and RSVD() */
> >> @@ -2225,6 +2230,7 @@ static const struct usb_device_id option_ids[] = {
> >> { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
> >> { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
> >> { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
> >> + { USB_DEVICE(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C) },
> >
> > You should match also on the interface class so that you don't try to
> > bind to the cdc interfaces. See USB_DEVICE_INTERFACE_CLASS() (and
> > RSVD() for the ADB interface).
>
> Thanks, the final result should look like this:
>
> { USB_DEVICE_INTERFACE_CLASS(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff),
> .driver_info = RSVD(12) },
Alternatively, it looks like you could use
USB_DEVICE_AND_INTERFACE_INFO() and match on ff/0/0. That's generally
preferred as it works also if the interface numbers can change.
Johan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] USB: serial: option: add UNISOC vendor and TOZED LT70C product
2023-04-17 14:19 ` Johan Hovold
@ 2023-04-17 15:08 ` Arınç ÜNAL
0 siblings, 0 replies; 5+ messages in thread
From: Arınç ÜNAL @ 2023-04-17 15:08 UTC (permalink / raw)
To: Johan Hovold
Cc: Greg Kroah-Hartman, Bjørn Mork, me, erkin.bozoglu, linux-usb,
linux-kernel
On 17.04.2023 17:19, Johan Hovold wrote:
> On Mon, Apr 17, 2023 at 01:42:05PM +0300, Arınç ÜNAL wrote:
>> On 13.04.2023 18:14, Johan Hovold wrote:
>>> On Thu, Apr 06, 2023 at 08:50:04AM +0300, arinc9.unal@gmail.com wrote:
>>>> From: Arınç ÜNAL <arinc.unal@arinc9.com>
>>>>
>>>> Add UNISOC vendor ID and TOZED LT70-C modem which is based from UNISOC
>>>> SL8563. The modem supports the NCM mode.
>>>
>>> Thanks for the patch. Looks mostly good, but see my comments below.
>>
>> Thanks a lot for looking at this Johan!
>>
>>>
>>>> T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 6 Spd=480 MxCh= 0
>>>> D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
>>>> P: Vendor=1782 ProdID=4055 Rev=04.04
>>>> S: Manufacturer=Unisoc Phone
>>>> S: Product=Unisoc Phone
>>>> S: SerialNumber=<redacted>
>>>> C: #Ifs=14 Cfg#= 1 Atr=c0 MxPwr=500mA
>>>> I: If#= 0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
>>>> E: Ad=82(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
>>>> I: If#= 1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
>>>> E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> I: If#=10 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>>>> E: Ad=07(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=8b(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> I: If#=11 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>>>> E: Ad=08(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=8c(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> I: If#=12 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=option
>>>> E: Ad=09(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=8d(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>
>>> This looks like an ADB interface which should be blacklisted (reserved)
>>> so that the driver does not bind to it.
>>
>> Will do.
>>
>>>
>>>> I: If#=13 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>>>> E: Ad=0a(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=8e(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> I: If#= 2 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
>>>> E: Ad=84(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
>>>> I: If#= 3 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
>>>> E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=83(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> I: If#= 4 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
>>>> E: Ad=86(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
>>>> I: If#= 5 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
>>>> E: Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> I: If#= 6 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0d Prot=00 Driver=cdc_ncm
>>>> E: Ad=88(I) Atr=03(Int.) MxPS= 16 Ivl=32ms
>>>> I: If#= 7 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=01 Driver=cdc_ncm
>>>> E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=87(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> I: If#= 8 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>>>> E: Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=89(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> I: If#= 9 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>>>> E: Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>>>> E: Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
>
>>>> ---
>>>> drivers/usb/serial/option.c | 6 ++++++
>>>> 1 file changed, 6 insertions(+)
>>>>
>>>> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
>>>> index f31cc3c76329..65a050a9ca39 100644
>>>> --- a/drivers/usb/serial/option.c
>>>> +++ b/drivers/usb/serial/option.c
>>>> @@ -595,6 +595,11 @@ static void option_instat_callback(struct urb *urb);
>>>> #define SIERRA_VENDOR_ID 0x1199
>>>> #define SIERRA_PRODUCT_EM9191 0x90d3
>>>>
>>>> +/* UNISOC (Spreadtrum) products */
>>>> +#define UNISOC_VENDOR_ID 0x1782
>>>> +/* TOZED TL70-C based on UNISOC SL8563 uses UNISOC's vendor ID */
>>>> +#define TOZED_PRODUCT_LT70C 0x4055
>>>> +
>>>> /* Device flags */
>>>>
>>>> /* Highest interface number which can be used with NCTRL() and RSVD() */
>>>> @@ -2225,6 +2230,7 @@ static const struct usb_device_id option_ids[] = {
>>>> { USB_DEVICE_AND_INTERFACE_INFO(OPPO_VENDOR_ID, OPPO_PRODUCT_R11, 0xff, 0xff, 0x30) },
>>>> { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0xff, 0x30) },
>>>> { USB_DEVICE_AND_INTERFACE_INFO(SIERRA_VENDOR_ID, SIERRA_PRODUCT_EM9191, 0xff, 0, 0) },
>>>> + { USB_DEVICE(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C) },
>>>
>>> You should match also on the interface class so that you don't try to
>>> bind to the cdc interfaces. See USB_DEVICE_INTERFACE_CLASS() (and
>>> RSVD() for the ADB interface).
>>
>> Thanks, the final result should look like this:
>>
>> { USB_DEVICE_INTERFACE_CLASS(UNISOC_VENDOR_ID, TOZED_PRODUCT_LT70C, 0xff),
>> .driver_info = RSVD(12) },
>
> Alternatively, it looks like you could use
> USB_DEVICE_AND_INTERFACE_INFO() and match on ff/0/0. That's generally
> preferred as it works also if the interface numbers can change.
Sounds good. I also don't need to use RSVD() since this won't match the
ADB interface if I understand correctly.
I'll send v2 in a short moment.
Arınç
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-04-17 15:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-06 5:50 [PATCH] USB: serial: option: add UNISOC vendor and TOZED LT70C product arinc9.unal
2023-04-13 15:14 ` Johan Hovold
2023-04-17 10:42 ` Arınç ÜNAL
2023-04-17 14:19 ` Johan Hovold
2023-04-17 15:08 ` Arınç ÜNAL
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox