linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB: serial: option: add support for DW5829e
@ 2022-02-09  3:15 Slark Xiao
  2022-02-09 14:27 ` Johan Hovold
  0 siblings, 1 reply; 6+ messages in thread
From: Slark Xiao @ 2022-02-09  3:15 UTC (permalink / raw)
  To: johan, gregkh; +Cc: linux-usb, linux-kernel, Slark Xiao

Dell DW5829e same as DW5821e except CAT level.
DW5821e supports CAT16 but DW5829e supports CAT9.
There are 2 types product of DW5829e: normal and eSIM.
So we will add 2 PID for DW5829e.
And for each PID, it support MBIM or RMNET.
Let's see test evidence as below:

DW5829e MBIM mode:
T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  4 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  2
P:  Vendor=413c ProdID=81e6 Rev=03.18
S:  Manufacturer=Dell Inc.
S:  Product=DW5829e Snapdragon X20 LTE
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=896mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#=0x6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

DW5829e RMNET mode:
T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  5 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
P:  Vendor=413c ProdID=81e6 Rev=03.18
S:  Manufacturer=Dell Inc.
S:  Product=DW5829e Snapdragon X20 LTE
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option

DW5829e-eSIM MBIM mode:
T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  6 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  2
P:  Vendor=413c ProdID=81e4 Rev=03.18
S:  Manufacturer=Dell Inc.
S:  Product=DW5829e-eSIM Snapdragon X20 LTE
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=896mA
I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
I:  If#=0x6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)

DW5829e-eSIM RMNET mode:
T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=5000 MxCh= 0
D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
P:  Vendor=413c ProdID=81e4 Rev=03.18
S:  Manufacturer=Dell Inc.
S:  Product=DW5829e-eSIM Snapdragon X20 LTE
S:  SerialNumber=0123456789ABCDEF
C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option

BTW, the interface 0x6 of MBIM mode is GNSS port, which not same as NMEA
port. So it's banned from serial option driver.
The remaining interfaces 0x2-0x5 are: MODEM, MODEM, NMEA, DIAG.

Signed-off-by: Slark Xiao <slark_xiao@163.com>
---
 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 962e9943fc20..b47bad810eec 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -198,6 +198,8 @@ static void option_instat_callback(struct urb *urb);
 
 #define DELL_PRODUCT_5821E			0x81d7
 #define DELL_PRODUCT_5821E_ESIM			0x81e0
+#define DELL_PRODUCT_5829E			0x81e6
+#define DELL_PRODUCT_5829E_ESIM			0x81e4
 
 #define KYOCERA_VENDOR_ID			0x0c88
 #define KYOCERA_PRODUCT_KPC650			0x17da
@@ -1063,6 +1065,10 @@ static const struct usb_device_id option_ids[] = {
 	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
 	{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E_ESIM),
 	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
+	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E, 0xff),
+	  .driver_info = RSVD(6) },
+	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E_ESIM, 0xff),
+	  .driver_info = RSVD(6) },
 	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },	/* ADU-E100, ADU-310 */
 	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
 	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] USB: serial: option: add support for DW5829e
  2022-02-09  3:15 [PATCH] USB: serial: option: add support for DW5829e Slark Xiao
@ 2022-02-09 14:27 ` Johan Hovold
  2022-02-10  3:27   ` Slark Xiao
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2022-02-09 14:27 UTC (permalink / raw)
  To: Slark Xiao; +Cc: gregkh, linux-usb, linux-kernel

On Wed, Feb 09, 2022 at 11:15:35AM +0800, Slark Xiao wrote:
> Dell DW5829e same as DW5821e except CAT level.
> DW5821e supports CAT16 but DW5829e supports CAT9.
> There are 2 types product of DW5829e: normal and eSIM.
> So we will add 2 PID for DW5829e.
> And for each PID, it support MBIM or RMNET.
> Let's see test evidence as below:
> 
> DW5829e MBIM mode:
> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  4 Spd=5000 MxCh= 0
> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  2
> P:  Vendor=413c ProdID=81e6 Rev=03.18
> S:  Manufacturer=Dell Inc.
> S:  Product=DW5829e Snapdragon X20 LTE
> S:  SerialNumber=0123456789ABCDEF
> C:  #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=896mA
> I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
> I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
> I:  If#=0x6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
> 
> DW5829e RMNET mode:
> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  5 Spd=5000 MxCh= 0
> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
> P:  Vendor=413c ProdID=81e6 Rev=03.18
> S:  Manufacturer=Dell Inc.
> S:  Product=DW5829e Snapdragon X20 LTE
> S:  SerialNumber=0123456789ABCDEF
> C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
> I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
> I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
> 
> DW5829e-eSIM MBIM mode:
> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  6 Spd=5000 MxCh= 0
> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  2
> P:  Vendor=413c ProdID=81e4 Rev=03.18
> S:  Manufacturer=Dell Inc.
> S:  Product=DW5829e-eSIM Snapdragon X20 LTE
> S:  SerialNumber=0123456789ABCDEF
> C:  #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=896mA
> I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
> I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
> I:  If#=0x6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
> 
> DW5829e-eSIM RMNET mode:
> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=5000 MxCh= 0
> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
> P:  Vendor=413c ProdID=81e4 Rev=03.18
> S:  Manufacturer=Dell Inc.
> S:  Product=DW5829e-eSIM Snapdragon X20 LTE
> S:  SerialNumber=0123456789ABCDEF
> C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
> I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
> I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
> 
> BTW, the interface 0x6 of MBIM mode is GNSS port, which not same as NMEA
> port. So it's banned from serial option driver.
> The remaining interfaces 0x2-0x5 are: MODEM, MODEM, NMEA, DIAG.
> 
> Signed-off-by: Slark Xiao <slark_xiao@163.com>

Thanks for providing all the necessary details.

> ---
>  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 962e9943fc20..b47bad810eec 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -198,6 +198,8 @@ static void option_instat_callback(struct urb *urb);
>  
>  #define DELL_PRODUCT_5821E			0x81d7
>  #define DELL_PRODUCT_5821E_ESIM			0x81e0
> +#define DELL_PRODUCT_5829E			0x81e6
> +#define DELL_PRODUCT_5829E_ESIM			0x81e4

Please keep the defines sorted by PID.

>  #define KYOCERA_VENDOR_ID			0x0c88
>  #define KYOCERA_PRODUCT_KPC650			0x17da
> @@ -1063,6 +1065,10 @@ static const struct usb_device_id option_ids[] = {
>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
>  	{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E_ESIM),
>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E, 0xff),
> +	  .driver_info = RSVD(6) },
> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E_ESIM, 0xff),
> +	  .driver_info = RSVD(6) },

It looks like these entries will cause the driver to bind also to the
QMI port however.

>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },	/* ADU-E100, ADU-310 */
>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },

Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re:Re: [PATCH] USB: serial: option: add support for DW5829e
  2022-02-09 14:27 ` Johan Hovold
@ 2022-02-10  3:27   ` Slark Xiao
  2022-02-21  9:07     ` Johan Hovold
  0 siblings, 1 reply; 6+ messages in thread
From: Slark Xiao @ 2022-02-10  3:27 UTC (permalink / raw)
  To: Johan Hovold; +Cc: gregkh, linux-usb, linux-kernel



At 2022-02-09 22:27:01, "Johan Hovold" <johan@kernel.org> wrote:

>On Wed, Feb 09, 2022 at 11:15:35AM +0800, Slark Xiao wrote:
>> Dell DW5829e same as DW5821e except CAT level.
>> DW5821e supports CAT16 but DW5829e supports CAT9.
>> There are 2 types product of DW5829e: normal and eSIM.
>> So we will add 2 PID for DW5829e.
>> And for each PID, it support MBIM or RMNET.
>> Let's see test evidence as below:
>> 
>> DW5829e MBIM mode:
>> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  4 Spd=5000 MxCh= 0
>> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  2
>> P:  Vendor=413c ProdID=81e6 Rev=03.18
>> S:  Manufacturer=Dell Inc.
>> S:  Product=DW5829e Snapdragon X20 LTE
>> S:  SerialNumber=0123456789ABCDEF
>> C:  #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=896mA
>> I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
>> I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
>> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> I:  If#=0x6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
>> 
>> DW5829e RMNET mode:
>> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  5 Spd=5000 MxCh= 0
>> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
>> P:  Vendor=413c ProdID=81e6 Rev=03.18
>> S:  Manufacturer=Dell Inc.
>> S:  Product=DW5829e Snapdragon X20 LTE
>> S:  SerialNumber=0123456789ABCDEF
>> C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
>> I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
>> I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
>> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> 
>> DW5829e-eSIM MBIM mode:
>> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  6 Spd=5000 MxCh= 0
>> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  2
>> P:  Vendor=413c ProdID=81e4 Rev=03.18
>> S:  Manufacturer=Dell Inc.
>> S:  Product=DW5829e-eSIM Snapdragon X20 LTE
>> S:  SerialNumber=0123456789ABCDEF
>> C:  #Ifs= 7 Cfg#= 2 Atr=a0 MxPwr=896mA
>> I:  If#=0x0 Alt= 0 #EPs= 1 Cls=02(commc) Sub=0e Prot=00 Driver=cdc_mbim
>> I:  If#=0x1 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
>> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> I:  If#=0x6 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=ff Prot=ff Driver=(none)
>> 
>> DW5829e-eSIM RMNET mode:
>> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=5000 MxCh= 0
>> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
>> P:  Vendor=413c ProdID=81e4 Rev=03.18
>> S:  Manufacturer=Dell Inc.
>> S:  Product=DW5829e-eSIM Snapdragon X20 LTE
>> S:  SerialNumber=0123456789ABCDEF
>> C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
>> I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
>> I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
>> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>> 
>> BTW, the interface 0x6 of MBIM mode is GNSS port, which not same as NMEA
>> port. So it's banned from serial option driver.
>> The remaining interfaces 0x2-0x5 are: MODEM, MODEM, NMEA, DIAG.
>> 
>> Signed-off-by: Slark Xiao <slark_xiao@163.com>
>
>Thanks for providing all the necessary details.
>
>> ---
>>  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 962e9943fc20..b47bad810eec 100644
>> --- a/drivers/usb/serial/option.c
>> +++ b/drivers/usb/serial/option.c
>> @@ -198,6 +198,8 @@ static void option_instat_callback(struct urb *urb);
>>  
>>  #define DELL_PRODUCT_5821E			0x81d7
>>  #define DELL_PRODUCT_5821E_ESIM			0x81e0
>> +#define DELL_PRODUCT_5829E			0x81e6
>> +#define DELL_PRODUCT_5829E_ESIM			0x81e4
>
>Please keep the defines sorted by PID.
>
OK, I will update it in V2 version.

>>  #define KYOCERA_VENDOR_ID			0x0c88
>>  #define KYOCERA_PRODUCT_KPC650			0x17da
>> @@ -1063,6 +1065,10 @@ static const struct usb_device_id option_ids[] = {
>>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
>>  	{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E_ESIM),
>>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
>> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E, 0xff),
>> +	  .driver_info = RSVD(6) },
>> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E_ESIM, 0xff),
>> +	  .driver_info = RSVD(6) },
>
>It looks like these entries will cause the driver to bind also to the
>QMI port however.
>
Actually not,  currently RMNET port would load the qmi_wwan driver successfully even the class of QMI is also 0xff.
Do you mean I should add RSVD(0) to reduce confusion?

>>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },	/* ADU-E100, ADU-310 */
>>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
>>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
>
>Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: [PATCH] USB: serial: option: add support for DW5829e
  2022-02-10  3:27   ` Slark Xiao
@ 2022-02-21  9:07     ` Johan Hovold
  2022-02-21  9:20       ` Slark Xiao
  0 siblings, 1 reply; 6+ messages in thread
From: Johan Hovold @ 2022-02-21  9:07 UTC (permalink / raw)
  To: Slark Xiao; +Cc: gregkh, linux-usb, linux-kernel

On Thu, Feb 10, 2022 at 11:27:45AM +0800, Slark Xiao wrote:
> At 2022-02-09 22:27:01, "Johan Hovold" <johan@kernel.org> wrote:
> >On Wed, Feb 09, 2022 at 11:15:35AM +0800, Slark Xiao wrote:

> >> DW5829e RMNET mode:
> >> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  5 Spd=5000 MxCh= 0
> >> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
> >> P:  Vendor=413c ProdID=81e6 Rev=03.18
> >> S:  Manufacturer=Dell Inc.
> >> S:  Product=DW5829e Snapdragon X20 LTE
> >> S:  SerialNumber=0123456789ABCDEF
> >> C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
> >> I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
> >> I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
> >> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option

> >> DW5829e-eSIM RMNET mode:
> >> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=5000 MxCh= 0
> >> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
> >> P:  Vendor=413c ProdID=81e4 Rev=03.18
> >> S:  Manufacturer=Dell Inc.
> >> S:  Product=DW5829e-eSIM Snapdragon X20 LTE
> >> S:  SerialNumber=0123456789ABCDEF
> >> C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
> >> I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
> >> I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
> >> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> >> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option

> >>  #define KYOCERA_VENDOR_ID			0x0c88
> >>  #define KYOCERA_PRODUCT_KPC650			0x17da
> >> @@ -1063,6 +1065,10 @@ static const struct usb_device_id option_ids[] = {
> >>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
> >>  	{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E_ESIM),
> >>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
> >> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E, 0xff),
> >> +	  .driver_info = RSVD(6) },
> >> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E_ESIM, 0xff),
> >> +	  .driver_info = RSVD(6) },
> >
> >It looks like these entries will cause the driver to bind also to the
> >QMI port however.
> >

> Actually not,  currently RMNET port would load the qmi_wwan driver
> successfully even the class of QMI is also 0xff.

That's not guaranteed so RMNET mode could break depending on probe
order with the above entries.

> Do you mean I should add RSVD(0) to reduce confusion?

You need to reserve it for correctness (or restructure the entries in
some other way to achieve the same result).
 
> >>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },	/* ADU-E100, ADU-310 */
> >>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
> >>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },

Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re:Re: Re: [PATCH] USB: serial: option: add support for DW5829e
  2022-02-21  9:07     ` Johan Hovold
@ 2022-02-21  9:20       ` Slark Xiao
  2022-02-21  9:43         ` Johan Hovold
  0 siblings, 1 reply; 6+ messages in thread
From: Slark Xiao @ 2022-02-21  9:20 UTC (permalink / raw)
  To: Johan Hovold; +Cc: gregkh, linux-usb, linux-kernel

















At 2022-02-21 17:07:35, "Johan Hovold" <johan@kernel.org> wrote:
>On Thu, Feb 10, 2022 at 11:27:45AM +0800, Slark Xiao wrote:
>> At 2022-02-09 22:27:01, "Johan Hovold" <johan@kernel.org> wrote:
>> >On Wed, Feb 09, 2022 at 11:15:35AM +0800, Slark Xiao wrote:
>
>> >> DW5829e RMNET mode:
>> >> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  5 Spd=5000 MxCh= 0
>> >> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
>> >> P:  Vendor=413c ProdID=81e6 Rev=03.18
>> >> S:  Manufacturer=Dell Inc.
>> >> S:  Product=DW5829e Snapdragon X20 LTE
>> >> S:  SerialNumber=0123456789ABCDEF
>> >> C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
>> >> I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
>> >> I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
>> >> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> >> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> >> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> >> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>
>> >> DW5829e-eSIM RMNET mode:
>> >> T:  Bus=04 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  7 Spd=5000 MxCh= 0
>> >> D:  Ver= 3.10 Cls=ef(misc ) Sub=02 Prot=01 MxPS= 9 #Cfgs=  1
>> >> P:  Vendor=413c ProdID=81e4 Rev=03.18
>> >> S:  Manufacturer=Dell Inc.
>> >> S:  Product=DW5829e-eSIM Snapdragon X20 LTE
>> >> S:  SerialNumber=0123456789ABCDEF
>> >> C:  #Ifs= 6 Cfg#= 1 Atr=a0 MxPwr=896mA
>> >> I:  If#=0x0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=qmi_wwan
>> >> I:  If#=0x1 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
>> >> I:  If#=0x2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> >> I:  If#=0x3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> >> I:  If#=0x4 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>> >> I:  If#=0x5 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option
>
>> >>  #define KYOCERA_VENDOR_ID			0x0c88
>> >>  #define KYOCERA_PRODUCT_KPC650			0x17da
>> >> @@ -1063,6 +1065,10 @@ static const struct usb_device_id option_ids[] = {
>> >>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
>> >>  	{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E_ESIM),
>> >>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
>> >> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E, 0xff),
>> >> +	  .driver_info = RSVD(6) },
>> >> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E_ESIM, 0xff),
>> >> +	  .driver_info = RSVD(6) },
>> >
>> >It looks like these entries will cause the driver to bind also to the
>> >QMI port however.
>> >
>
>> Actually not,  currently RMNET port would load the qmi_wwan driver
>> successfully even the class of QMI is also 0xff.
>
>That's not guaranteed so RMNET mode could break depending on probe
>order with the above entries.
>
>> Do you mean I should add RSVD(0) to reduce confusion?
>
>You need to reserve it for correctness (or restructure the entries in
>some other way to achieve the same result).
> 
Yes, so I re-send a V2 version to reserve interface 0,1,6. Please help take a look on that.
Thanks.
>> >>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_E100A) },	/* ADU-E100, ADU-310 */
>> >>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_500A) },
>> >>  	{ USB_DEVICE(ANYDATA_VENDOR_ID, ANYDATA_PRODUCT_ADU_620UW) },
>
>Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Re: Re: [PATCH] USB: serial: option: add support for DW5829e
  2022-02-21  9:20       ` Slark Xiao
@ 2022-02-21  9:43         ` Johan Hovold
  0 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2022-02-21  9:43 UTC (permalink / raw)
  To: Slark Xiao; +Cc: gregkh, linux-usb, linux-kernel

On Mon, Feb 21, 2022 at 05:20:05PM +0800, Slark Xiao wrote:

 >> >> @@ -1063,6 +1065,10 @@ static const struct usb_device_id option_ids[] = {
> >> >>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
> >> >>  	{ USB_DEVICE(DELL_VENDOR_ID, DELL_PRODUCT_5821E_ESIM),
> >> >>  	  .driver_info = RSVD(0) | RSVD(1) | RSVD(6) },
> >> >> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E, 0xff),
> >> >> +	  .driver_info = RSVD(6) },
> >> >> +	{ USB_DEVICE_INTERFACE_CLASS(DELL_VENDOR_ID, DELL_PRODUCT_5829E_ESIM, 0xff),
> >> >> +	  .driver_info = RSVD(6) },
> >> >
> >> >It looks like these entries will cause the driver to bind also to the
> >> >QMI port however.
> >> >
> >
> >> Actually not,  currently RMNET port would load the qmi_wwan driver
> >> successfully even the class of QMI is also 0xff.
> >
> >That's not guaranteed so RMNET mode could break depending on probe
> >order with the above entries.
> >
> >> Do you mean I should add RSVD(0) to reduce confusion?
> >
> >You need to reserve it for correctness (or restructure the entries in
> >some other way to achieve the same result).
> > 
> Yes, so I re-send a V2 version to reserve interface 0,1,6. Please help take a look on that.

There's no need to reserve interface 1 since it's not vendor class in
any configuration. I've already fixed up and applied your v2.

Also, in the future, please make sure to wrap the lines of your mails at
72 column or so.

Johan

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-02-21 10:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-09  3:15 [PATCH] USB: serial: option: add support for DW5829e Slark Xiao
2022-02-09 14:27 ` Johan Hovold
2022-02-10  3:27   ` Slark Xiao
2022-02-21  9:07     ` Johan Hovold
2022-02-21  9:20       ` Slark Xiao
2022-02-21  9:43         ` Johan Hovold

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).