2011-05-26 21:13:16

by Michael Tokarev

[permalink] [raw]
Subject: option driver, ZTE MF_330 matches linux usb 2.0 root hub

I noticed that recently, all my systems started
loading option.ko driver even if I've no single
GSM modem anywhere around.

After some investigation I found this in option.c:

/* ZTE PRODUCTS -- alternate vendor ID */
#define ZTE_VENDOR_ID2 0x1d6b
#define ZTE_PRODUCT_MF_330 0x0002
...
{ USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) },


But this matches... "Linux Foundation 2.0 root hub",
which has this module alias:

usb:v1D6Bp0002d0206dc09dsc00dp00ic09isc00ip00

What are options to fix this option now? :)

Thanks!

[Cc'ing linux-kernel due to interesting USB ID clash]

/mjt


2011-05-26 21:28:42

by Michael Tokarev

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

27.05.2011 01:13, Michael Tokarev wrote:
> I noticed that recently, all my systems started
> loading option.ko driver even if I've no single
> GSM modem anywhere around.
>
> After some investigation I found this in option.c:
>
> /* ZTE PRODUCTS -- alternate vendor ID */
> #define ZTE_VENDOR_ID2 0x1d6b
> #define ZTE_PRODUCT_MF_330 0x0002
> ...
> { USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) },
>
>
> But this matches... "Linux Foundation 2.0 root hub",
> which has this module alias:
>
> usb:v1D6Bp0002d0206dc09dsc00dp00ic09isc00ip00

Forgot to mention, and to add proper Cc. The commit
is this one:

commit a559d2c8c1bf652ea2d0ecd6ab4a250fcdb37db8
Author: Dominik Brodowski <[email protected]>
Date: Wed Apr 14 21:36:42 2010 +0200

USB: option: add ID for ZTE MF 330

Based on the information provided for by Paweł Drobek, add
a second vendor ID and the correct product ID for ZTE MF 330.

Reported-by: Paweł Drobek <[email protected]>
Signed-off: Dominik Brodowski <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

Are the IDs really correct? Maybe it's just a typo
after all...

It is interesting that no one noticed this so far.
Or it's just because it's difficult to search for -
"option" is really a bad search term ;)

> What are options to fix this option now? :)
>
> Thanks!
>
> [Cc'ing linux-kernel due to interesting USB ID clash]

/mjt

2011-05-27 01:28:07

by Greg KH

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

On Fri, May 27, 2011 at 01:28:38AM +0400, Michael Tokarev wrote:
> 27.05.2011 01:13, Michael Tokarev wrote:
> > I noticed that recently, all my systems started
> > loading option.ko driver even if I've no single
> > GSM modem anywhere around.
> >
> > After some investigation I found this in option.c:
> >
> > /* ZTE PRODUCTS -- alternate vendor ID */
> > #define ZTE_VENDOR_ID2 0x1d6b
> > #define ZTE_PRODUCT_MF_330 0x0002
> > ...
> > { USB_DEVICE(ZTE_VENDOR_ID2, ZTE_PRODUCT_MF_330) },
> >
> >
> > But this matches... "Linux Foundation 2.0 root hub",
> > which has this module alias:
> >
> > usb:v1D6Bp0002d0206dc09dsc00dp00ic09isc00ip00
>
> Forgot to mention, and to add proper Cc. The commit
> is this one:
>
> commit a559d2c8c1bf652ea2d0ecd6ab4a250fcdb37db8
> Author: Dominik Brodowski <[email protected]>
> Date: Wed Apr 14 21:36:42 2010 +0200
>
> USB: option: add ID for ZTE MF 330
>
> Based on the information provided for by Paweł Drobek, add
> a second vendor ID and the correct product ID for ZTE MF 330.
>
> Reported-by: Paweł Drobek <[email protected]>
> Signed-off: Dominik Brodowski <[email protected]>
> Signed-off-by: Greg Kroah-Hartman <[email protected]>
>
> Are the IDs really correct? Maybe it's just a typo
> after all...

I don't know, Paweł, can you provide the output of 'lsusb -v' for your
system where you saw this being a option device instead of a hub?

thanks,

greg k-h

2011-05-27 06:19:45

by Michael Tokarev

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

27.05.2011 09:40, Paweł Drobek wrote:
> I have got device with this ID's and you are right ID2 is usb2 hub id
> but when you put my device into computer with this settings my device
> report it self as gsm modem based on option.ko module. as far i know
> there are no other solution to get working zte 330 on linux.

Can you please provide the information Greg asked?

> I don't know, Paweł, can you provide the output of 'lsusb -v' for your
> system where you saw this being a option device instead of a hub?

Namely, `lsusb -v' output from the system when this
modem is inserted.

At least, maybe this device ID should be restricted to
the particular class of devices. Alternatively, if number
of such devices on the marked is small (google wasn't able
to find any other references), it should be easy to control
it using a custom udev rule that loads `option' driver and
forcibly binds it to this device. That is, by the way, an
alternative solution to make it work.

But it is curious that ZTE used "wrong" vendor class for
its product.

Thanks!

/mjt

2011-05-27 09:04:27

by Michael Tokarev

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

27.05.2011 11:41, Paweł Drobek пишет:
> ok, but i have to find pcmcia pci card then put it on pc because i sold
> my notebook some time ago.

Which PCMCIA card? The device at question is USB, not PCMCIA,
that's why we requested lsusb.

Has anyone else seen this device? For some reason I doubt
it has the indicated USB ID...

Thanks,

/mjt

2011-05-27 10:03:00

by Greg KH

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

On Fri, May 27, 2011 at 11:06:37AM +0200, Paweł Drobek wrote:
> dunno, zte mf330 is pcmcia card identified itself as usb device which need to
> get working pcmcia options from kernel.

Yes, older devices put a whole USB host controller device on the PCMCIA
card in order to talk to it properly without having to change their
hardware design of the modem chip.

Crazy but true.

greg k-h

2011-05-27 13:19:53

by Michael Tokarev

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

27.05.2011 14:02, Greg KH wrote:
> On Fri, May 27, 2011 at 11:06:37AM +0200, Paweł Drobek wrote:
>> dunno, zte mf330 is pcmcia card identified itself as usb device which need to
>> get working pcmcia options from kernel.
>
> Yes, older devices put a whole USB host controller device on the PCMCIA
> card in order to talk to it properly without having to change their
> hardware design of the modem chip.

So, what's our course of actions now?

I'd suggest to revert this change and deal with this device
again (specifying the device IDs more precisely, like,
including the device class or what it is called in USB
world) when someone will have it for real.

Thanks,

/mjt

2011-05-27 21:42:15

by Greg KH

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

On Fri, May 27, 2011 at 03:24:02PM +0200, Paweł Drobek wrote:
> On weekend i could give you all data which you need to do more precisely
> action. Just write all command should i give.

The output of:
lsusb -v
is all that we need.

thanks,

greg k-h

2011-06-06 13:21:32

by Michael Tokarev

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

27.05.2011 17:24, Paweł Drobek wrote:
> On weekend i could give you all data which you need to do more precisely
> action. Just write all command should i give.

Paweł, are there any news on this?

Thanks,

/mjt

> 2011/5/27 Michael Tokarev <[email protected] <mailto:[email protected]>>
>
> 27.05.2011 14:02, Greg KH wrote:
> > On Fri, May 27, 2011 at 11:06:37AM +0200, Paweł Drobek wrote:
> >> dunno, zte mf330 is pcmcia card identified itself as usb device
> which need to
> >> get working pcmcia options from kernel.
> >
> > Yes, older devices put a whole USB host controller device on the
> PCMCIA
> > card in order to talk to it properly without having to change their
> > hardware design of the modem chip.
>
> So, what's our course of actions now?
>
> I'd suggest to revert this change and deal with this device
> again (specifying the device IDs more precisely, like,
> including the device class or what it is called in USB
> world) when someone will have it for real.
>
> Thanks,
>
> /mjt
>
>
>
>
> --
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.12
> GCS d+ s:+ a- C++ UL++++ P L+++ !E W+++ N++ o+ K- w++
> !O M V- PS+ PE+ Y PGP++ !t !5 X++++ R+ tv- b++ DI++ D++
> G++ e+++ h+ r-- y
> ------END GEEK CODE BLOCK------
>

2011-06-07 04:49:00

by Paweł Drobek

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

Dnia 2011-06-06, pon o godzinie 15:36 +0200, Paweł Drobek pisze:
> Nope sorry, i got very busy week. Mayby tomorrow i could check id
>
> sorry
>
> W dniu 6 czerwca 2011 15:21 użytkownik Michael Tokarev
> <[email protected]> napisał:
> 27.05.2011 17:24, Paweł Drobek wrote:
> > On weekend i could give you all data which you need to do
> more precisely
> > action. Just write all command should i give.
>
>
> Paweł, are there any news on this?
>
> Thanks,
>
> /mjt
>
> > 2011/5/27 Michael Tokarev <[email protected]
> <mailto:[email protected]>>
>
> >
> > 27.05.2011 14:02, Greg KH wrote:
> > > On Fri, May 27, 2011 at 11:06:37AM +0200, Paweł Drobek
> wrote:
> > >> dunno, zte mf330 is pcmcia card identified itself as
> usb device
> > which need to
> > >> get working pcmcia options from kernel.
> > >
> > > Yes, older devices put a whole USB host controller
> device on the
> > PCMCIA
> > > card in order to talk to it properly without having to
> change their
> > > hardware design of the modem chip.
> >
> > So, what's our course of actions now?
> >
> > I'd suggest to revert this change and deal with this
> device
> > again (specifying the device IDs more precisely, like,
> > including the device class or what it is called in USB
> > world) when someone will have it for real.
> >
> > Thanks,
> >
> > /mjt
> >
> >
> >
> >
> > --
> > -----BEGIN GEEK CODE BLOCK-----
> > Version: 3.12
> > GCS d+ s:+ a- C++ UL++++ P L+++ !E W+++ N++ o+ K- w++
> > !O M V- PS+ PE+ Y PGP++ !t !5 X++++ R+ tv- b++ DI++ D++
> > G++ e+++ h+ r-- y
> > ------END GEEK CODE BLOCK------
> >
>
>
>
>
>
> --
> -----BEGIN GEEK CODE BLOCK-----
> Version: 3.12
> GCS d+ s:+ a- C++ UL++++ P L+++ !E W+++ N++ o+ K- w++
> !O M V- PS+ PE+ Y PGP++ !t !5 X++++ R+ tv- b++ DI++ D++
> G++ e+++ h+ r-- y
> ------END GEEK CODE BLOCK------
>

Hi guys

In attachment is a file with "lsusb -v" output, please check it. if you
need something more feel free to tell me about it

Best regards Pawel


Attachments:
lsusb (28.47 kB)

2011-06-07 06:36:01

by Michael Tokarev

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

07.06.2011 08:48, Paweł Drobek wrote:

> Bus 003 Device 002: ID 19d2:0001 ONDA Communication S.p.A.
> Device Descriptor:
> bLength 18
> bDescriptorType 1
> bcdUSB 1.10
> bDeviceClass 0 (Defined at Interface level)
> bDeviceSubClass 0
> bDeviceProtocol 0
> bMaxPacketSize0 64
> idVendor 0x19d2 ONDA Communication S.p.A.
> idProduct 0x0001
> bcdDevice 0.00
> iManufacturer 1 Qualcomm, Incorporated
> iProduct 2 ZTE CDMA Technologies MSM
> iSerial 0
> bNumConfigurations 1
> Configuration Descriptor:
> bLength 9
> bDescriptorType 2
> wTotalLength 85
> bNumInterfaces 3
> bConfigurationValue 1
> iConfiguration 0
> bmAttributes 0xa0
> (Bus Powered)
> Remote Wakeup
> MaxPower 500mA
> Interface Descriptor:
> bLength 9
> bDescriptorType 4
> bInterfaceNumber 0
> bAlternateSetting 0
> bNumEndpoints 3
> bInterfaceClass 255 Vendor Specific Class
> bInterfaceSubClass 255 Vendor Specific Subclass
> bInterfaceProtocol 255 Vendor Specific Protocol
> iInterface 3 Data Interface

So, as far as I can see, this is covered by

#define ZTE_VENDOR_ID 0x19d2
#define ZTE_PRODUCT_MF622 0x0001

{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */

and it should Just Work aftere reverting a559d2c8c1bf652ea2d0ecd6ab4a250fcdb37db8
"USB: option: add ID for ZTE MF 330". But I'm not sure this really
is MF330, since the device ID says it's MF622.

Are we talking about the same device?

Besides, why in linux it's identified as ZTE, while
lsusb lists it as "ONDA Comm." ?

Thanks,

/mjt

2011-06-08 13:32:41

by Jiri Kosina

[permalink] [raw]
Subject: Re: option driver, ZTE MF_330 matches linux usb 2.0 root hub

On Tue, 7 Jun 2011, Michael Tokarev wrote:

> > Bus 003 Device 002: ID 19d2:0001 ONDA Communication S.p.A.
> > Device Descriptor:
> > bLength 18
> > bDescriptorType 1
> > bcdUSB 1.10
> > bDeviceClass 0 (Defined at Interface level)
> > bDeviceSubClass 0
> > bDeviceProtocol 0
> > bMaxPacketSize0 64
> > idVendor 0x19d2 ONDA Communication S.p.A.
> > idProduct 0x0001
> > bcdDevice 0.00
> > iManufacturer 1 Qualcomm, Incorporated
> > iProduct 2 ZTE CDMA Technologies MSM
> > iSerial 0
> > bNumConfigurations 1
> > Configuration Descriptor:
> > bLength 9
> > bDescriptorType 2
> > wTotalLength 85
> > bNumInterfaces 3
> > bConfigurationValue 1
> > iConfiguration 0
> > bmAttributes 0xa0
> > (Bus Powered)
> > Remote Wakeup
> > MaxPower 500mA
> > Interface Descriptor:
> > bLength 9
> > bDescriptorType 4
> > bInterfaceNumber 0
> > bAlternateSetting 0
> > bNumEndpoints 3
> > bInterfaceClass 255 Vendor Specific Class
> > bInterfaceSubClass 255 Vendor Specific Subclass
> > bInterfaceProtocol 255 Vendor Specific Protocol
> > iInterface 3 Data Interface
>
> So, as far as I can see, this is covered by
>
> #define ZTE_VENDOR_ID 0x19d2
> #define ZTE_PRODUCT_MF622 0x0001
>
> { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
>
> and it should Just Work aftere reverting a559d2c8c1bf652ea2d0ecd6ab4a250fcdb37db8
> "USB: option: add ID for ZTE MF 330". But I'm not sure this really
> is MF330, since the device ID says it's MF622.
>
> Are we talking about the same device?
>
> Besides, why in linux it's identified as ZTE, while
> lsusb lists it as "ONDA Comm." ?

ONDA and ZTE are usually the very same chip.

Also please note that USB ID of these devices usually changes after
'usb_modeswtich' triggers in userspace (and many distros ship udev rule
for this as a default nowadays), which might contribute to the overall
confusion a little bit more.

--
Jiri Kosina
SUSE Labs