netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* qmi_wwan on Huawei E398
@ 2013-01-11 12:43 Cedric Jehasse
  2013-01-11 19:27 ` Bjørn Mork
  0 siblings, 1 reply; 3+ messages in thread
From: Cedric Jehasse @ 2013-01-11 12:43 UTC (permalink / raw)
  To: netdev; +Cc: bjorn

Hi,

I'm trying to use qmi on an Huawei E398 dongle with ofono on a 3.7.1
kernel. (this works with a 3.5.0 kernel)
ofono looks for the class/subclass/protocol of the parent
usb_interface device for the qmi_wwan and cdc_wdm devices. This must
match with ff/01/08 and ff/01/09 Cls/Sub/Prot.

Below is a trace of the udev events and usb-device output for a 3.5.0
and 3.7.1 kernel. The difference is in the parent devices for wwan0
and cdc-wdm0.
The parent device for wwan0 is on a 3.7.1 kernel is If3. Is this normal?

* 3.5.0:
KERNEL[201.262240] add
/devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.3/usb/cdc-wdm0 (usb)
KERNEL[201.347292] add
/devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.4/net/wwan0 (net)

T:  Bus=02 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=12d1 ProdID=150a Rev=00.00
S:  Manufacturer=Huawei Technologies
S:  Product=HUAWEI Mobile
S:  SerialNumber=1234567890ABCDEF
C:  #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=option
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=02 Driver=option
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=03 Driver=option
I:  If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=01 Prot=09 Driver=cdc_wdm
I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=08 Driver=qmi_wwan
I:  If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
I:  If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

* 3.7.1:
KERNEL[61750.414019] add
/devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.3/usbmisc/cdc-wdm0
(usbmisc)
KERNEL[61750.414019] add
/devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.3/usbmisc/cdc-wdm0
(usbmisc)

T:  Bus=02 Lev=01 Prnt=01 Port=05 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=12d1 ProdID=150a Rev=00.00
S:  Manufacturer=Huawei Technologies
S:  Product=HUAWEI Mobile
S:  SerialNumber=1234567890ABCDEF
C:  #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=option
I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=02 Driver=option
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=03 Driver=option
I:  If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=01 Prot=09 Driver=qmi_wwan
I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=08 Driver=qmi_wwan
I:  If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
I:  If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage

Thanks,
Cedric

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

* Re: qmi_wwan on Huawei E398
  2013-01-11 12:43 qmi_wwan on Huawei E398 Cedric Jehasse
@ 2013-01-11 19:27 ` Bjørn Mork
       [not found]   ` <CAGOautsU-Hen5EP-Y3Xp+jzGYRJZQFCGRk=mt0MvH2GfpTQe4g@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Bjørn Mork @ 2013-01-11 19:27 UTC (permalink / raw)
  To: Cedric Jehasse, netdev

Cedric Jehasse <cedric.jehasse@gmail.com> wrote:

>Hi,
>
>I'm trying to use qmi on an Huawei E398 dongle with ofono on a 3.7.1
>kernel. (this works with a 3.5.0 kernel)
>ofono looks for the class/subclass/protocol of the parent
>usb_interface device for the qmi_wwan and cdc_wdm devices. This must
>match with ff/01/08 and ff/01/09 Cls/Sub/Prot.
>
>Below is a trace of the udev events and usb-device output for a 3.5.0
>and 3.7.1 kernel. The difference is in the parent devices for wwan0
>and cdc-wdm0.
>The parent device for wwan0 is on a 3.7.1 kernel is If3. Is this
>normal?
>
>* 3.5.0:
>KERNEL[201.262240] add
>/devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.3/usb/cdc-wdm0 (usb)
>KERNEL[201.347292] add
>/devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.4/net/wwan0 (net)
>
>T:  Bus=02 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#=  4 Spd=480 MxCh= 0
>D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
>P:  Vendor=12d1 ProdID=150a Rev=00.00
>S:  Manufacturer=Huawei Technologies
>S:  Product=HUAWEI Mobile
>S:  SerialNumber=1234567890ABCDEF
>C:  #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
>I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=option
>I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=02 Driver=option
>I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=03 Driver=option
>I:  If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=01 Prot=09 Driver=cdc_wdm
>I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=08 Driver=qmi_wwan
>I:  If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
>Driver=usb-storage
>I:  If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
>Driver=usb-storage
>
>* 3.7.1:
>KERNEL[61750.414019] add
>/devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.3/usbmisc/cdc-wdm0
>(usbmisc)
>KERNEL[61750.414019] add
>/devices/pci0000:00/0000:00:1d.7/usb2/2-6/2-6:1.3/usbmisc/cdc-wdm0
>(usbmisc)
>
>T:  Bus=02 Lev=01 Prnt=01 Port=05 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=12d1 ProdID=150a Rev=00.00
>S:  Manufacturer=Huawei Technologies
>S:  Product=HUAWEI Mobile
>S:  SerialNumber=1234567890ABCDEF
>C:  #Ifs= 7 Cfg#= 1 Atr=c0 MxPwr=500mA
>I:  If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=01 Prot=01 Driver=option
>I:  If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=02 Driver=option
>I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=03 Driver=option
>I:  If#= 3 Alt= 0 #EPs= 1 Cls=ff(vend.) Sub=01 Prot=09 Driver=qmi_wwan
>I:  If#= 4 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=01 Prot=08 Driver=qmi_wwan
>I:  If#= 5 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
>Driver=usb-storage
>I:  If#= 6 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50
>Driver=usb-storage
>
>Thanks,
>Cedric

This looks right to me. There is a single function using two USB interfaces. We started out letting the cdc-wdm driver handle the control interface and the qmi_wwan driver the data interface. This is what you see in 3.5. But splitting a function like this was very awkward and made devices like the E398 behave differently from most other QMI devices, which only use a single USB interface. 

So we changed this to let the qmi_wwan driver handle both interfaces. This is what you see in 3.7. The control interface is now the parent of both the cdc_wdm character device and the wwan network device and the data interface is just a data interface.

I realize that this is balancing on the edge of acceptable userspace visible changes, but all this did was making devices like the E398 look similar to single interface devices. Which already had to be supported by the userspace applications.

Now I understand that ofono does a lot stricter matching than I have anticipated, looking at the vendor specific subclass and protocol fields of the wwan parent interface. I don't think we can fix that without updating ofono. Sorry. If it is going to do that then it needs to accept both ff/01/08 and ff/01/09.


Bjørn

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

* Re: qmi_wwan on Huawei E398
       [not found]   ` <CAGOautsU-Hen5EP-Y3Xp+jzGYRJZQFCGRk=mt0MvH2GfpTQe4g@mail.gmail.com>
@ 2013-01-12 12:22     ` Cedric Jehasse
  0 siblings, 0 replies; 3+ messages in thread
From: Cedric Jehasse @ 2013-01-12 12:22 UTC (permalink / raw)
  To: Marius Kotsbak; +Cc: Bjørn Mork, netdev

>
> Have you tried if the same happens with modemmanager?
>
No, i haven`t. And it's not really relevant for me, as modemmanager
might match interfaces in a different way.

It looked weird to me to have a single parent interface for both the
cdc_dwm device and the wwan device, while there are separate
usb_interfaces for control and data.
From Bjørn's explanation, i understand why this was done. And i will
take a look at how this can be changed in ofono.

Thanks,
Cedric

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

end of thread, other threads:[~2013-01-12 12:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-11 12:43 qmi_wwan on Huawei E398 Cedric Jehasse
2013-01-11 19:27 ` Bjørn Mork
     [not found]   ` <CAGOautsU-Hen5EP-Y3Xp+jzGYRJZQFCGRk=mt0MvH2GfpTQe4g@mail.gmail.com>
2013-01-12 12:22     ` Cedric Jehasse

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