linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] USB: serial: option: Add support for ZTE MF871A
@ 2019-07-11  6:53 Yoshiaki Okamoto
  2019-07-16  9:05 ` Johan Hovold
  0 siblings, 1 reply; 11+ messages in thread
From: Yoshiaki Okamoto @ 2019-07-11  6:53 UTC (permalink / raw)
  To: johan; +Cc: hyamamo, linux-usb

This patch adds support for MF871A USB modem (aka Speed USB STICK U03)
to option driver. This modem is manufactured by ZTE corporation, and
sold by KDDI.

Interface layout:
0: AT
1: MODEM

usb-devices output:
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=1481 Rev=52.87
S:  Manufacturer=ZTE,Incorporated
S:  Product=ZTE Technologies MSM
S:  SerialNumber=1234567890ABCDEF
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option

Signed-off-by: Yoshiaki Okamoto <yokamoto@allied-telesis.co.jp>
Signed-off-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
---
 drivers/usb/serial/option.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index a0aaf0635359..e11ae2092229 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -308,6 +308,7 @@ static void option_instat_callback(struct urb *urb);
 #define ZTE_PRODUCT_ME3620_MBIM			0x0426
 #define ZTE_PRODUCT_ME3620_X			0x1432
 #define ZTE_PRODUCT_ME3620_L			0x1433
+#define ZTE_PRODUCT_MF871A			0x1481
 #define ZTE_PRODUCT_AC2726			0xfff1
 #define ZTE_PRODUCT_MG880			0xfffd
 #define ZTE_PRODUCT_CDMA_TECH			0xfffe
@@ -1548,6 +1549,7 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff),  /* Telewell TW-LTE 4G v2 */
 	  .driver_info = RSVD(2) },
 	{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) },	/* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
+	{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, ZTE_PRODUCT_MF871A, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },


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

* Re: [PATCH] USB: serial: option: Add support for ZTE MF871A
  2019-07-11  6:53 [PATCH] USB: serial: option: Add support for ZTE MF871A Yoshiaki Okamoto
@ 2019-07-16  9:05 ` Johan Hovold
  2019-07-17  5:31   ` OKAMOTO Yoshiaki
  2019-07-17  5:40   ` [PATCH v2] " Yoshiaki Okamoto
  0 siblings, 2 replies; 11+ messages in thread
From: Johan Hovold @ 2019-07-16  9:05 UTC (permalink / raw)
  To: Yoshiaki Okamoto; +Cc: johan, hyamamo, linux-usb

On Thu, Jul 11, 2019 at 03:53:24PM +0900, Yoshiaki Okamoto wrote:
> This patch adds support for MF871A USB modem (aka Speed USB STICK U03)
> to option driver. This modem is manufactured by ZTE corporation, and
> sold by KDDI.
> 
> Interface layout:
> 0: AT
> 1: MODEM
> 
> usb-devices output:
> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=19d2 ProdID=1481 Rev=52.87
> S:  Manufacturer=ZTE,Incorporated
> S:  Product=ZTE Technologies MSM
> S:  SerialNumber=1234567890ABCDEF
> C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
> I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option

Thanks for the patch. Looks good, but please fix up the two minor issues
pointed out below and resend, and I'll apply it after the merge window
closes.
 
> Signed-off-by: Yoshiaki Okamoto <yokamoto@allied-telesis.co.jp>
> Signed-off-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>

Since you are the one submitting the patch your SoB should go last. We
have a Co-developed-by tag which can you use to indicate co-authorship
(the second SoB is still required). The documentation for this was
recently updated in commit

	24a2bb90741b ("docs: Clarify the usage and sign-off requirements for Co-developed-by")

> ---
>  drivers/usb/serial/option.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index a0aaf0635359..e11ae2092229 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -308,6 +308,7 @@ static void option_instat_callback(struct urb *urb);
>  #define ZTE_PRODUCT_ME3620_MBIM			0x0426
>  #define ZTE_PRODUCT_ME3620_X			0x1432
>  #define ZTE_PRODUCT_ME3620_L			0x1433
> +#define ZTE_PRODUCT_MF871A			0x1481
>  #define ZTE_PRODUCT_AC2726			0xfff1
>  #define ZTE_PRODUCT_MG880			0xfffd
>  #define ZTE_PRODUCT_CDMA_TECH			0xfffe
> @@ -1548,6 +1549,7 @@ static const struct usb_device_id option_ids[] = {
>  	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff),  /* Telewell TW-LTE 4G v2 */
>  	  .driver_info = RSVD(2) },
>  	{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) },	/* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
> +	{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, ZTE_PRODUCT_MF871A, 0xff) },

We're trying to move away from adding product-id defines, so please just
use a constant here as most ZTE entries do and add a short comment after
the entry. It's fine to go above 80 columns here even if checkpatch.pl
complains.

>  	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
>  	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },

Thanks,
Johan

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

* Re: [PATCH] USB: serial: option: Add support for ZTE MF871A
  2019-07-16  9:05 ` Johan Hovold
@ 2019-07-17  5:31   ` OKAMOTO Yoshiaki
  2019-07-17  5:40   ` [PATCH v2] " Yoshiaki Okamoto
  1 sibling, 0 replies; 11+ messages in thread
From: OKAMOTO Yoshiaki @ 2019-07-17  5:31 UTC (permalink / raw)
  To: Johan Hovold; +Cc: YAMAMOTO Hiroyuki, linux-usb

Hi Johan,

> Since you are the one submitting the patch your SoB should go last. We
> have a Co-developed-by tag which can you use to indicate co-authorship
> (the second SoB is still required). The documentation for this was
> recently updated in commit
>
>        24a2bb90741b ("docs: Clarify the usage and sign-off requirements for Co-developed-by")
>
>
> We're trying to move away from adding product-id defines, so please just
> use a constant here as most ZTE entries do and add a short comment after
> the entry. It's fine to go above 80 columns here even if checkpatch.pl
> complains.
>
OK. I will fix up your pinted issues and resend patch.

Regards,
Yoshiaki Okamoto

________________________________________
From: Johan Hovold <johan@kernel.org>
Sent: Tuesday, July 16, 2019 18:05
To: OKAMOTO Yoshiaki
Cc: johan@kernel.org; YAMAMOTO Hiroyuki; linux-usb@vger.kernel.org
Subject: Re: [PATCH] USB: serial: option: Add support for ZTE MF871A

On Thu, Jul 11, 2019 at 03:53:24PM +0900, Yoshiaki Okamoto wrote:
> This patch adds support for MF871A USB modem (aka Speed USB STICK U03)
> to option driver. This modem is manufactured by ZTE corporation, and
> sold by KDDI.
>
> Interface layout:
> 0: AT
> 1: MODEM
>
> usb-devices output:
> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=19d2 ProdID=1481 Rev=52.87
> S:  Manufacturer=ZTE,Incorporated
> S:  Product=ZTE Technologies MSM
> S:  SerialNumber=1234567890ABCDEF
> C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
> I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option

Thanks for the patch. Looks good, but please fix up the two minor issues
pointed out below and resend, and I'll apply it after the merge window
closes.

> Signed-off-by: Yoshiaki Okamoto <yokamoto@allied-telesis.co.jp>
> Signed-off-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>

Since you are the one submitting the patch your SoB should go last. We
have a Co-developed-by tag which can you use to indicate co-authorship
(the second SoB is still required). The documentation for this was
recently updated in commit

        24a2bb90741b ("docs: Clarify the usage and sign-off requirements for Co-developed-by")

> ---
>  drivers/usb/serial/option.c |    2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index a0aaf0635359..e11ae2092229 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -308,6 +308,7 @@ static void option_instat_callback(struct urb *urb);
>  #define ZTE_PRODUCT_ME3620_MBIM                      0x0426
>  #define ZTE_PRODUCT_ME3620_X                 0x1432
>  #define ZTE_PRODUCT_ME3620_L                 0x1433
> +#define ZTE_PRODUCT_MF871A                   0x1481
>  #define ZTE_PRODUCT_AC2726                   0xfff1
>  #define ZTE_PRODUCT_MG880                    0xfffd
>  #define ZTE_PRODUCT_CDMA_TECH                        0xfffe
> @@ -1548,6 +1549,7 @@ static const struct usb_device_id option_ids[] = {
>       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff),  /* Telewell TW-LTE 4G v2 */
>         .driver_info = RSVD(2) },
>       { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) },    /* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
> +     { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, ZTE_PRODUCT_MF871A, 0xff) },

We're trying to move away from adding product-id defines, so please just
use a constant here as most ZTE entries do and add a short comment after
the entry. It's fine to go above 80 columns here even if checkpatch.pl
complains.

>       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
>       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
>       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },

Thanks,
Johan

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

* [PATCH v2] USB: serial: option: Add support for ZTE MF871A
  2019-07-16  9:05 ` Johan Hovold
  2019-07-17  5:31   ` OKAMOTO Yoshiaki
@ 2019-07-17  5:40   ` Yoshiaki Okamoto
  2019-07-17  6:21     ` Johan Hovold
  2019-07-17 12:05     ` Lars Melin
  1 sibling, 2 replies; 11+ messages in thread
From: Yoshiaki Okamoto @ 2019-07-17  5:40 UTC (permalink / raw)
  To: johan; +Cc: hyamamo, linux-usb

This patch adds support for MF871A USB modem (aka Speed USB STICK U03)
to option driver. This modem is manufactured by ZTE corporation, and
sold by KDDI.

Interface layout:
0: AT
1: MODEM

usb-devices output:
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=1481 Rev=52.87
S:  Manufacturer=ZTE,Incorporated
S:  Product=ZTE Technologies MSM
S:  SerialNumber=1234567890ABCDEF
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option

Co-developed-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
Signed-off-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
Signed-off-by: Yoshiaki Okamoto <yokamoto@allied-telesis.co.jp>
---

Changes in v2:
- Add Co-developed-by tag.
- Move away product-id define and add short comment after the entry.

 drivers/usb/serial/option.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index a0aaf0635359..3188b3cb0f21 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1548,6 +1548,7 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff),  /* Telewell TW-LTE 4G v2 */
 	  .driver_info = RSVD(2) },
 	{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) },	/* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
+	{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1481, 0xff) },	/* ZTE MF871A */
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },


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

* Re: [PATCH v2] USB: serial: option: Add support for ZTE MF871A
  2019-07-17  5:40   ` [PATCH v2] " Yoshiaki Okamoto
@ 2019-07-17  6:21     ` Johan Hovold
  2019-07-17 12:05     ` Lars Melin
  1 sibling, 0 replies; 11+ messages in thread
From: Johan Hovold @ 2019-07-17  6:21 UTC (permalink / raw)
  To: Yoshiaki Okamoto; +Cc: johan, hyamamo, linux-usb

On Wed, Jul 17, 2019 at 02:40:16PM +0900, Yoshiaki Okamoto wrote:
> This patch adds support for MF871A USB modem (aka Speed USB STICK U03)
> to option driver. This modem is manufactured by ZTE corporation, and
> sold by KDDI.
> 
> Interface layout:
> 0: AT
> 1: MODEM
> 
> usb-devices output:
> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=19d2 ProdID=1481 Rev=52.87
> S:  Manufacturer=ZTE,Incorporated
> S:  Product=ZTE Technologies MSM
> S:  SerialNumber=1234567890ABCDEF
> C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
> I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> 
> Co-developed-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
> Signed-off-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
> Signed-off-by: Yoshiaki Okamoto <yokamoto@allied-telesis.co.jp>
> ---
> 
> Changes in v2:
> - Add Co-developed-by tag.
> - Move away product-id define and add short comment after the entry.

Perfect, thanks for the update. I'll queue this one up after the merge
window closes.

Johan

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

* Re: [PATCH v2] USB: serial: option: Add support for ZTE MF871A
  2019-07-17  5:40   ` [PATCH v2] " Yoshiaki Okamoto
  2019-07-17  6:21     ` Johan Hovold
@ 2019-07-17 12:05     ` Lars Melin
  2019-07-18 14:46       ` OKAMOTO Yoshiaki
  1 sibling, 1 reply; 11+ messages in thread
From: Lars Melin @ 2019-07-17 12:05 UTC (permalink / raw)
  To: Yoshiaki Okamoto, johan; +Cc: hyamamo, linux-usb

On 7/17/2019 12:40, Yoshiaki Okamoto wrote:
> This patch adds support for MF871A USB modem (aka Speed USB STICK U03)
> to option driver. This modem is manufactured by ZTE corporation, and
> sold by KDDI.
> 
> Interface layout:
> 0: AT
> 1: MODEM
> 
> usb-devices output:
> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=19d2 ProdID=1481 Rev=52.87
> S:  Manufacturer=ZTE,Incorporated
> S:  Product=ZTE Technologies MSM
> S:  SerialNumber=1234567890ABCDEF
> C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
> I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> 
> Co-developed-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
> Signed-off-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
> Signed-off-by: Yoshiaki Okamoto <yokamoto@allied-telesis.co.jp>
> ---
> 
> Changes in v2:
> - Add Co-developed-by tag.
> - Move away product-id define and add short comment after the entry.
> 
>   drivers/usb/serial/option.c |    1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index a0aaf0635359..3188b3cb0f21 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -1548,6 +1548,7 @@ static const struct usb_device_id option_ids[] = {
>   	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff),  /* Telewell TW-LTE 4G v2 */
>   	  .driver_info = RSVD(2) },
>   	{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) },	/* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
> +	{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1481, 0xff) },	/* ZTE MF871A */
>   	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
>   	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
>   	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
> 

Please do a full test of the interface attributes (Class/SubClass/Proto) 
whenever possible, this could be helpful in case the mfgr makes a device 
with different interface layout but re-uses an already used vid:pid.
Both interfaces has attributes ff/00/00 so there is no reason for doing 
a less accurate test.

rgds
/Lars


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

* RE: [PATCH v2] USB: serial: option: Add support for ZTE MF871A
  2019-07-17 12:05     ` Lars Melin
@ 2019-07-18 14:46       ` OKAMOTO Yoshiaki
  2019-07-19  4:09         ` Lars Melin
  0 siblings, 1 reply; 11+ messages in thread
From: OKAMOTO Yoshiaki @ 2019-07-18 14:46 UTC (permalink / raw)
  To: Lars Melin, johan; +Cc: YAMAMOTO Hiroyuki, linux-usb


Hi Lars,

> Please do a full test of the interface attributes (Class/SubClass/Proto)
> whenever possible, this could be helpful in case the mfgr makes a device
> with different interface layout but re-uses an already used vid:pid.
>
What should we do specifically for "a full test of the interface attributes"?


> Both interfaces has attributes ff/00/00 so there is no reason for doing a less accurate test.
>
Forgive me if I’m wrong, did you say mean that we should use USB_DEVICE_AND_INTERFACE_INFO" instead of "USB_DEVICE_INTERFACE_CLASS" ?

Regards,
Yoshiaki Okamoto

________________________________________
差出人: Lars Melin <larsm17@gmail.com>
送信日時: 2019年7月17日 21:05
宛先: OKAMOTO Yoshiaki; johan@kernel.org
CC: YAMAMOTO Hiroyuki; linux-usb@vger.kernel.org
件名: Re: [PATCH v2] USB: serial: option: Add support for ZTE MF871A

On 7/17/2019 12:40, Yoshiaki Okamoto wrote:
> This patch adds support for MF871A USB modem (aka Speed USB STICK U03)
> to option driver. This modem is manufactured by ZTE corporation, and
> sold by KDDI.
>
> Interface layout:
> 0: AT
> 1: MODEM
>
> usb-devices output:
> T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
> D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
> P:  Vendor=19d2 ProdID=1481 Rev=52.87
> S:  Manufacturer=ZTE,Incorporated
> S:  Product=ZTE Technologies MSM
> S:  SerialNumber=1234567890ABCDEF
> C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
> I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
> I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
>
> Co-developed-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
> Signed-off-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
> Signed-off-by: Yoshiaki Okamoto <yokamoto@allied-telesis.co.jp>
> ---
>
> Changes in v2:
> - Add Co-developed-by tag.
> - Move away product-id define and add short comment after the entry.
>
>   drivers/usb/serial/option.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
> index a0aaf0635359..3188b3cb0f21 100644
> --- a/drivers/usb/serial/option.c
> +++ b/drivers/usb/serial/option.c
> @@ -1548,6 +1548,7 @@ static const struct usb_device_id option_ids[] = {
>       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff),  /* Telewell TW-LTE 4G v2 */
>         .driver_info = RSVD(2) },
>       { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) },    /* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
> +     { USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1481, 0xff) },    /* ZTE MF871A */
>       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
>       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
>       { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },
>

Please do a full test of the interface attributes (Class/SubClass/Proto)
whenever possible, this could be helpful in case the mfgr makes a device
with different interface layout but re-uses an already used vid:pid.
Both interfaces has attributes ff/00/00 so there is no reason for doing
a less accurate test.

rgds
/Lars


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

* Re: [PATCH v2] USB: serial: option: Add support for ZTE MF871A
  2019-07-18 14:46       ` OKAMOTO Yoshiaki
@ 2019-07-19  4:09         ` Lars Melin
  2019-07-20 13:20           ` OKAMOTO Yoshiaki
  2019-07-20 13:23           ` [PATCH v3] " Yoshiaki Okamoto
  0 siblings, 2 replies; 11+ messages in thread
From: Lars Melin @ 2019-07-19  4:09 UTC (permalink / raw)
  To: OKAMOTO Yoshiaki, johan; +Cc: YAMAMOTO Hiroyuki, linux-usb

On 7/18/2019 21:46, OKAMOTO Yoshiaki wrote:
> 
> Hi Lars,
> 
>> Please do a full test of the interface attributes (Class/SubClass/Proto)
>> whenever possible, this could be helpful in case the mfgr makes a device
>> with different interface layout but re-uses an already used vid:pid.
>>
> What should we do specifically for "a full test of the interface attributes"?
> 
> 
>> Both interfaces has attributes ff/00/00 so there is no reason for doing a less accurate test.
>>
> Forgive me if I’m wrong, did you say mean that we should use USB_DEVICE_AND_INTERFACE_INFO" instead of "USB_DEVICE_INTERFACE_CLASS" ?
> 
> Regards,
> Yoshiaki Okamoto
> 


Yes, USB_DEVICE_AND_INTERFACE_INFO is the one to use when all the  
interfaces you add support for has identical class/subclass/protocol  
attributes.

rgds
/Lars


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

* Re: [PATCH v2] USB: serial: option: Add support for ZTE MF871A
  2019-07-19  4:09         ` Lars Melin
@ 2019-07-20 13:20           ` OKAMOTO Yoshiaki
  2019-07-20 13:23           ` [PATCH v3] " Yoshiaki Okamoto
  1 sibling, 0 replies; 11+ messages in thread
From: OKAMOTO Yoshiaki @ 2019-07-20 13:20 UTC (permalink / raw)
  To: Lars Melin, johan; +Cc: YAMAMOTO Hiroyuki, linux-usb

Hi Lars,

> Yes, USB_DEVICE_AND_INTERFACE_INFO is the one to use when all the
> interfaces you add support for has identical class/subclass/protocol
> attributes.
>
OK.  I will change it to  USB_DEVICE_AND_INTERFACE_INFO, and resend patch.

Regards,
Yoshiaki Okamoto

________________________________________
From: Lars Melin <larsm17@gmail.com>
Sent: Friday, July 19, 2019 13:09
To: OKAMOTO Yoshiaki; johan@kernel.org
Cc: YAMAMOTO Hiroyuki; linux-usb@vger.kernel.org
Subject: Re: [PATCH v2] USB: serial: option: Add support for ZTE MF871A

On 7/18/2019 21:46, OKAMOTO Yoshiaki wrote:
>
> Hi Lars,
>
>> Please do a full test of the interface attributes (Class/SubClass/Proto)
>> whenever possible, this could be helpful in case the mfgr makes a device
>> with different interface layout but re-uses an already used vid:pid.
>>
> What should we do specifically for "a full test of the interface attributes"?
>
>
>> Both interfaces has attributes ff/00/00 so there is no reason for doing a less accurate test.
>>
> Forgive me if I’m wrong, did you say mean that we should use USB_DEVICE_AND_INTERFACE_INFO" instead of "USB_DEVICE_INTERFACE_CLASS" ?
>
> Regards,
> Yoshiaki Okamoto
>


Yes, USB_DEVICE_AND_INTERFACE_INFO is the one to use when all the
interfaces you add support for has identical class/subclass/protocol
attributes.

rgds
/Lars


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

* [PATCH v3] USB: serial: option: Add support for ZTE MF871A
  2019-07-19  4:09         ` Lars Melin
  2019-07-20 13:20           ` OKAMOTO Yoshiaki
@ 2019-07-20 13:23           ` Yoshiaki Okamoto
  2019-08-05 11:27             ` Johan Hovold
  1 sibling, 1 reply; 11+ messages in thread
From: Yoshiaki Okamoto @ 2019-07-20 13:23 UTC (permalink / raw)
  To: larsm17, johan; +Cc: hyamamo, linux-usb

This patch adds support for MF871A USB modem (aka Speed USB STICK U03)
to option driver. This modem is manufactured by ZTE corporation, and
sold by KDDI.

Interface layout:
0: AT
1: MODEM

usb-devices output:
T:  Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  9 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=19d2 ProdID=1481 Rev=52.87
S:  Manufacturer=ZTE,Incorporated
S:  Product=ZTE Technologies MSM
S:  SerialNumber=1234567890ABCDEF
C:  #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option
I:  If#= 1 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=00 Driver=option

Co-developed-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
Signed-off-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
Signed-off-by: Yoshiaki Okamoto <yokamoto@allied-telesis.co.jp>
---

Changes in v3:
- Change used macro to USB_DEVICE_AND_INTERFACE_INFO.

Changes in v2:
- Add Co-developed-by tag.
- Move away product-id define and add short comment after the entry.

 drivers/usb/serial/option.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index a0aaf0635359..071e62164478 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -1548,6 +1548,7 @@ static const struct usb_device_id option_ids[] = {
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1428, 0xff, 0xff, 0xff),  /* Telewell TW-LTE 4G v2 */
 	  .driver_info = RSVD(2) },
 	{ USB_DEVICE_INTERFACE_CLASS(ZTE_VENDOR_ID, 0x1476, 0xff) },	/* GosunCn ZTE WeLink ME3630 (ECM/NCM mode) */
+	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1481, 0xff, 0x00, 0x00) }, /* ZTE MF871A */
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1533, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1534, 0xff, 0xff, 0xff) },
 	{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x1535, 0xff, 0xff, 0xff) },


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

* Re: [PATCH v3] USB: serial: option: Add support for ZTE MF871A
  2019-07-20 13:23           ` [PATCH v3] " Yoshiaki Okamoto
@ 2019-08-05 11:27             ` Johan Hovold
  0 siblings, 0 replies; 11+ messages in thread
From: Johan Hovold @ 2019-08-05 11:27 UTC (permalink / raw)
  To: Yoshiaki Okamoto; +Cc: larsm17, johan, hyamamo, linux-usb

On Sat, Jul 20, 2019 at 10:23:18PM +0900, Yoshiaki Okamoto wrote:
> This patch adds support for MF871A USB modem (aka Speed USB STICK U03)
> to option driver. This modem is manufactured by ZTE corporation, and
> sold by KDDI.

> Co-developed-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
> Signed-off-by: Hiroyuki Yamamoto <hyamamo@allied-telesis.co.jp>
> Signed-off-by: Yoshiaki Okamoto <yokamoto@allied-telesis.co.jp>
> ---
> 
> Changes in v3:
> - Change used macro to USB_DEVICE_AND_INTERFACE_INFO.
> 
> Changes in v2:
> - Add Co-developed-by tag.
> - Move away product-id define and add short comment after the entry.

Now applied, thanks.

Johan

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

end of thread, other threads:[~2019-08-05 11:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11  6:53 [PATCH] USB: serial: option: Add support for ZTE MF871A Yoshiaki Okamoto
2019-07-16  9:05 ` Johan Hovold
2019-07-17  5:31   ` OKAMOTO Yoshiaki
2019-07-17  5:40   ` [PATCH v2] " Yoshiaki Okamoto
2019-07-17  6:21     ` Johan Hovold
2019-07-17 12:05     ` Lars Melin
2019-07-18 14:46       ` OKAMOTO Yoshiaki
2019-07-19  4:09         ` Lars Melin
2019-07-20 13:20           ` OKAMOTO Yoshiaki
2019-07-20 13:23           ` [PATCH v3] " Yoshiaki Okamoto
2019-08-05 11:27             ` 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).