Will modem inhibition truly release MBIM port ?

Edward Chang edward.chang.foxconn at gmail.com
Tue Sep 22 08:25:26 UTC 2020


Hey  Bjørn and Aleksander,
Thanks !
I tested the Bjørn's patch and it works fine
I attached the log for the first 5 transactions.
Is the result as expected?

Thanks,
Edward Chang


On Tue, Sep 22, 2020 at 3:59 PM Aleksander Morgado <aleksander at aleksander.es>
wrote:

> Hey Bjørn & Edward
>
> > >> I've opened a new issue in gitlab for your problem:
> > >> https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/issues/9
> > >> Will take a look at the problem sometime this week.
> > >
> > > Something is incrementing the transaction id between each fragment:
> > >
> > > [21  ä¹   2020, 09:55:23] [Debug] [/dev/cdc-wdm_pcie] Sent message
> (translated)...
> > > <<<<<< Header:
> > > <<<<<<   length      = 4096
> > > <<<<<<   type        = command (0x00000003)
> > > <<<<<<   transaction = 4
> > > <<<<<< Fragment header:
> > > <<<<<<   total   = 65
> > > <<<<<<   current = 0
> > > <<<<<< Contents:
> > > <<<<<<   service = 'qdu' (6427015f-579d-48f5-8c54-f43ed1e76f83)
> > > <<<<<<   cid     = 'file-write' (0x00000003)
> > > <<<<<<   type    = 'set' (0x00000001)
> > > <<<<<< Fields:
> > > <<<<<<   DataBuffer =
> > > ..
> > >
> > > <<<<<< Header:
> > > <<<<<<   length      = 4096
> > > <<<<<<   type        = command (0x00000003)
> > > <<<<<<   transaction = 5
> > > <<<<<< Fragment header:
> > > <<<<<<   total   = 65
> > > <<<<<<   current = 1
> > > <<<<<< Contents:
> > > <<<<<<   service = 'invalid' (00000000-0000-0000-0000-000000000000)
> > > <<<<<<   cid     = '(null)' (0x00000000)
> > > <<<<<<   type    = 'query' (0x00000000)
> > >
> > >
> > >
> > > That's not good.  The function is supposed to err out both transactions
> > > when it sees this second fragment with a new transaction id:
> > >
> > >  If the function receives a fragment that is not the first fragment of
> a
> > >  new command with a new TransactionId, both commands shall be
> > >  discarded. One MBIM_FUNCTION_ERROR_MSG message per TransactionId shall
> > >  be sent.
> >
> > A proposed quickfix here:
> >
> https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/merge_requests/32
> >
>
> Nice! this makes sense, nice catch :)
>
> Edward, would you be able to test with Bjørn's patch?
>
> > But as noted: A real fix for proxied fragments will have to prevent
> > other clients from interfering.  Access to a device should be blocked
> > once a client starts a fragmented transaction, until either all
> > fragments have been submitted or some reasonable timeout. I guess
> > MAX_TIME_BETWEEN_FRAGMENTS_MS could be re-used.
> >
> > This means that fragmented transactions must be tracked by the proxy.
> >
>
> I've opened a new Issue to track this:
> https://gitlab.freedesktop.org/mobile-broadband/libmbim/-/issues/10
>
> --
> Aleksander
> https://aleksander.es
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20200922/d3fd2ac6/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: QDUwithMBIMproxyProposeFix.log
Type: application/octet-stream
Size: 1712253 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/modemmanager-devel/attachments/20200922/d3fd2ac6/attachment-0001.obj>


More information about the ModemManager-devel mailing list