Sierra Wireless EM7355

Bjørn Mork bjorn at mork.no
Wed Jun 18 06:31:06 PDT 2014


Dan Williams <dcbw at redhat.com> writes:

> On Wed, 2014-06-18 at 10:38 +0200, Bjørn Mork wrote:
>> Erinn Looney-Triggs <erinn.looneytriggs at gmail.com> writes:
>> > On 06/17/2014 04:24 PM, Dan Williams wrote:
>> >> On Tue, 2014-06-17 at 13:42 -0600, Erinn Looney-Triggs wrote:
>> >>> I am having trouble getting this device to work under Fedora 20.
>> >>> It is detected on first boot, though in a dual boot environment
>> >>> after booting into windows, it is still detected, though not
>> >>> configured. However, that is another issue.
>> >>
>> >> Until Bjorn drops some righteous knowledge on us...
>> >>
>> >> Bjorn posted some driver patches for the 7355 which just hit the
>> >> 3.14 stable kernel two weeks ago:
>> >>
>> >> https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/commit/?h=linux-3.14.y&id=d2c3d4f3bcfd826546cabcc1850b1a14ab2b4749
>> >>
>> >>  so make sure you're using the 3.14.5 or later kernel, which is
>> >> available in Fedora updates since early June.  Can you confirm that
>> >> you are using the 3.14.5 or later kernel, and if not, try it after
>> >> updating?
>> >>
>> >> Dan
>> >>
>> >
>> > Dan,
>> > Thanks for the suggestion, I am running against 3.14.7 right now, so
>> > no luck there.
>> 
>> No, that patch doesn't really matter here.  It is for qmi_wwan which you
>> won't use unless you choose to switch the modem to cfg #1.  MBIM is
>> supported by the class driver and does not depend on device IDs being
>> added.
>
> So it's got two configurations, the first one (presumably) for QMI and
> the second for MBIM, is that correct? 

Yup

> For future reference, from
> looking at the lsusb output, how do we know which one is active?

You don't :-)

That's one of the few missing pieces in lsusb.  It doesn't show which
configurations or altsettings are active. You can find out by peeking
into sysfs, for example the /sys/bus/usb/devices/.../bConfigurationValue
attribute (which also is writable if you want to change the active cfg).

You can also see it in the USB interface device names, which will be
prefixed by cfg number. For example:

 4-4:1.3 => bus4 - port4 : cfg1 . intf3
 2-3:2.12 => bus2 - port3 : cfg2 . intf12

etc.  Or you can guess based on the loaded drivers.  Which was what I
did (besides knowing the peculiar part of the USB core which makes it
default to cfg#2 for these modems).


But the absolutely easiest way to see the active configuration, as well
as active altsettings, is by mounting debugfs and looking at the
/sys/kernel/debug/usb/devices file.  It will mark the active settings
with an asterisk:


P:  Vendor=1199 ProdID=68a2 Rev= 0.06
S:  Manufacturer=Sierra Wireless, Incorporated
S:  Product=MC7710
S:  SerialNumber=358178040092316
C:  #Ifs= 6 Cfg#= 1 Atr=e0 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:  If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:  If#= 3 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=83(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=84(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=03(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:  If#= 8 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=85(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=86(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:  If#=19 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=87(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=05(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
I:  If#=20 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=
E:  Ad=89(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
E:  Ad=8a(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=06(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms
C:* #Ifs= 2 Cfg#= 2 Atr=e0 MxPwr=  0mA
A:  FirstIf#=12 IfCount= 2 Cls=02(comm.) Sub=0e Prot=00
I:* If#=12 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=0e Prot=00 Driver=cdc_mbim
E:  Ad=81(I) Atr=03(Int.) MxPS=  64 Ivl=2ms
I:  If#=13 Alt= 0 #EPs= 0 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
I:* If#=13 Alt= 1 #EPs= 2 Cls=0a(data ) Sub=00 Prot=02 Driver=cdc_mbim
E:  Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=4ms

>  Or
> does the kernel have code to bind the class driver before specific
> drivers, so that it always matches MBIM before qmi_wwan?

Yes, that is what Linux does in this case.  If the _first_ interface in
a configuration is class specific, then that configuration is preferred
over configurations where the first interface is vendor specific.

Sort of unexpected behaviour if you ask me, but of course not changable
anymore.

If you had a modem with the same QMI + MBIM dual configuration, but
where the QMI configuration was hidden behind a usb-storage mode
switching function (which is common for e.g. Huawei modems), then the
QMI configuration would be chosen by default because the usb-storage
interface is class specific...



Bjørn


More information about the ModemManager-devel mailing list