[RFC] Remove version checks for all QMI methods?
Dan Williams
dcbw at redhat.com
Mon Jul 9 14:41:47 UTC 2018
On Sun, 2018-07-08 at 14:49 +0200, Aleksander Morgado wrote:
> Hey,
>
> I'd like to suggest removing part of the logic behind
> QMI_DEVICE_OPEN_FLAGS_VERSION_INFO.
>
> This flag given to qmi_device_open() will do 2 things:
> * Load QMI service version info of the module during the open
> operation.
> * Validate each executed method against the version configured in
> the
> database, and if the version in the database is newer, fail the
> method
> with an error.
>
> Now, the second part of the logic is only meaningful if we have a
> correct list of when each QMI method was introduced in the QMI
> service
> versions, and that info is mostly broken.
>
> E.g. I can try to run --dms-restore-factory-defaults (supposedly
> only
> available since DMS 1.6) in a module that reports DMS 1.1, and that
> will fail if I'm using the QMI_DEVICE_OPEN_FLAGS_VERSION_INFO flag:
>
> $ sudo qmicli -p -d /dev/cdc-wdm0
> --dms-restore-factory-defaults=123456 --device-open-version-info
> error: operation failed: Cannot send message: QMI service 'dms'
> version '1.6' required, got version '1.0'
>
> $ sudo qmicli -p -d /dev/cdc-wdm0 --dms-restore-factory-
> defaults=123456
> error: couldn't restores factory defaults: QMI protocol error (34):
> 'AuthenticationFailed'
>
> How about we make QMI_DEVICE_OPEN_FLAGS_VERSION_INFO not do any
> explicit check against any version, and if the method isn't
> supported,
> well, the module will report an error itself, we don't need any
> additional logic on top.
>
> And while doing that, I'd like to remove all "version" tags from the
> QMI database we have, as those wouldn't be needed any more.
>
> What do you all think?
I think that's fine.
dan
More information about the libqmi-devel
mailing list