EM120 not correctly booting up, unknown wwan control port exposed?

Aleksander Morgado aleksander at aleksander.es
Sat May 22 22:17:25 UTC 2021


Hey again,

The "wwan0" thing is unrelated to the actual problem I saw with the
EM120 going away.

> There is one interesting thing in the MM log, though, maybe it's MM
> the one causing the issue.
> See this list of ports and the details for each port reported via udev/sysfs.
>
> The first port we find is the net port as we scan net subsystem first:
>
> ModemManager[2490]: <debug> [1621709598.546715] [mhi_mbim0] port
> contents loaded:
> ModemManager[2490]: <debug> [1621709598.546823] [mhi_mbim0]   bus: pci
> ModemManager[2490]: <debug> [1621709598.546974] [mhi_mbim0]   device:
> /sys/devices/pci0000:00/0000:00:1b.0/0000:01:00.0
> ModemManager[2490]: <debug> [1621709598.547071] [mhi_mbim0]   driver: mhi_net
> ModemManager[2490]: <debug> [1621709598.547175] [mhi_mbim0]   vendor: 1eac
> ModemManager[2490]: <debug> [1621709598.547275] [mhi_mbim0]   product: 1001
> ModemManager[2490]: <debug> [1621709598.547375] [base-manager] adding
> port mhi_mbim0 at sysfs path:
> /sys/devices/pci0000:00/0000:00:1b.0/0000:01:00.0/mhi0/mhi0_IP_HW0_MBIM/net/mhi_mbim0
> ModemManager[2490]: <debug> [1621709598.548559] [filter]
> (net/mhi_mbim0) port allowed: net device
> ModemManager[2490]: <debug> [1621709598.548785] [base-manager] port
> mhi_mbim0 is first in device
> /sys/devices/pci0000:00/0000:00:1b.0/0000:01:00.0
> ModemManager[2490]: <debug> [1621709598.549024] [plugin-manager] task
> 4: new support task for device:
> /sys/devices/pci0000:00/0000:00:1b.0/0000:01:00.0
> ModemManager[2490]: <debug> [1621709598.549359] [plugin-manager] task
> 4: port grabbed: mhi_mbim0
> ModemManager[2490]: <debug> [1621709598.549489] [plugin-manager] task
> 4,mhi_mbim0: new support task for port
> ModemManager[2490]: <debug> [1621709598.549585] [plugin-manager] task
> 4,mhi_mbim0: deferred until min wait time elapsed
>
> Then we find all these ports in the wwan subsystem:
>
> ModemManager[2490]: <debug> [1621709598.566894] [wwan0] port contents loaded:
> ModemManager[2490]: <debug> [1621709598.567007] [wwan0]   bus: pci
> ModemManager[2490]: <debug> [1621709598.567104] [wwan0]   device:
> /sys/devices/pci0000:00/0000:00:1b.0/0000:01:00.0
> ModemManager[2490]: <debug> [1621709598.567195] [wwan0]   driver:
> mhi-pci-generic
> ModemManager[2490]: <debug> [1621709598.567285] [wwan0]   vendor: 1eac
> ModemManager[2490]: <debug> [1621709598.567390] [wwan0]   product: 1001
> ModemManager[2490]: <debug> [1621709598.567488] [base-manager] adding
> port wwan0 at sysfs path:
> /sys/devices/pci0000:00/0000:00:1b.0/0000:01:00.0/mhi0/wwan/wwan0
> ModemManager[2490]: <debug> [1621709598.568261] [filter] (wwan/wwan0)
> port allowed: wwan device
> ModemManager[2490]: <debug> [1621709598.568542] [base-manager]
> additional port wwan0 in device
> /sys/devices/pci0000:00/0000:00:1b.0/0000:01:00.0
> ModemManager[2490]: <debug> [1621709598.568823] [plugin-manager] task
> 4: port grabbed: wwan0
> ModemManager[2490]: <debug> [1621709598.568968] [plugin-manager] task
> 4,wwan0: new support task for port
> ModemManager[2490]: <debug> [1621709598.569059] [plugin-manager] task
> 4,wwan0: deferred until min wait time elapsed
>
> What is this "wwan0" port exposed by the wwan subsystem? It doesn't
> have a protocol reported, still, it's exposed in the system.

Oh, I see now that it's not a port (wwan_port), it's the actual device
(wwan_dev)

$ sudo udevadm info -p
/sys/devices/pci0000:00/0000:00:1c.0/0000:08:00.0/mhi0/wwan/wwan0
P: /devices/pci0000:00/0000:00:1c.0/0000:08:00.0/mhi0/wwan/wwan0
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:08:00.0/mhi0/wwan/wwan0
E: DEVTYPE=wwan_dev
E: SUBSYSTEM=wwan
E: USEC_INITIALIZED=41894749
E: ID_MM_CANDIDATE=1

$ sudo udevadm info -p
/sys/devices/pci0000:00/0000:00:1c.0/0000:08:00.0/mhi0/wwan/wwan0/wwan0p2MBIM
P: /devices/pci0000:00/0000:00:1c.0/0000:08:00.0/mhi0/wwan/wwan0/wwan0p2MBIM
N: wwan0p2MBIM
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:08:00.0/mhi0/wwan/wwan0/wwan0p2MBIM
E: DEVNAME=/dev/wwan0p2MBIM
E: DEVTYPE=wwan_port
E: MAJOR=510
E: MINOR=1
E: SUBSYSTEM=wwan
E: USEC_INITIALIZED=41895254
E: ID_MM_CANDIDATE=1
E: ID_MM_PORT_TYPE_MBIM=1

> Due to
> this, we attempt to probe with all known protocols we may have in the
> subsystem:
>
> ModemManager[2490]: <debug> [1621709600.082522] [plugin/generic]
> probes required for port wwan0: 'at, qcdm, qmi, mbim'
>

Nah, this port probing is just something we log, we can then not do
any kind of probing because this is not a /dev port.

What we need to do is ignore all events if DEVTYPE=wwan_dev as we
don't require them for anything. Loic what do you think? we should
probably update the candidate udev tag only to match
DEVTYPE==wwan_port, right?

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list