[PATCH 2/3] base-manager: handle NULL physical device more gracefully

Aleksander Morgado aleksander at aleksander.es
Fri Feb 24 23:23:04 UTC 2017


On Fri, Feb 24, 2017 at 9:47 PM, Ben Chan <benchan at chromium.org> wrote:
>>
>>  * If user-provided UID via "self->priv->properties", return that one.
>>  * Otherwise, if user-provided UID via "ID_MM_PHYSDEV_UID", return that
>> one.
>
>
> I believe that's what MMKernelDeviceGeneric currently does. However,
> MMKernelDeviceUdev tries to get ID_MM_PHYSDEV_UID on self->priv->physdev
> instead of self->priv->device. That's first discrepancy I noticed. Is that
> expected?

Yeah, I think that's right. With the udev backend we are able to add
udev tags to the whole USB device or to a single port. And therefore,
we look for device-wide tags in the physdev device.

In the generic backend the udev tags are always associated directly to
the port device itself (i.e. the tags that were targeted to the whole
USB device are copied to directly to the per-port devices). This is
because in the generic backend there isn't a "tree" of "devices";
there are just single per-port devices that may share the same sysfs
path if they belong to the same physical device.

-- 
Aleksander
https://aleksander.es


More information about the ModemManager-devel mailing list