Message ID | 156334196350.13827.8927178214233271211.stgit@yokamoto-pc.rd.allied-telesis.co.jp (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2] USB: serial: option: Add support for ZTE MF871A | expand |
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
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
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
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
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
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) },