MS specific device services

Bjørn Mork bjorn at
Wed Feb 26 03:09:59 PST 2014

Aleksander Morgado <aleksander at> writes:
> On 26/02/14 11:32, Bjørn Mork wrote:
>> FWIW, I fail to see any usecase for MBIM_CID_MS_HOSTSHUTDOWN in Linux.
>> We cannot safely use it from userspace because we have to be able to
>> cancel a shutdown. And we do not know whether we will be able to power
>> on the modem again after this command.  Maybe the user only wanted to
>> stop ModemManager...
> This command would be useful to implement switching the modem to e.g.
> 'OFF' power state in ModemManager, where the user should only try to
> externally cut power to the modem device. I believe that the whole idea
> is to let the modem know that the power is going to be cut, so that it
> does IMSI detach, power off radios,

I don't see why MBIM_CID_RADIO_STATE cannot be used for this.  It's
standard and mandatory.  Using it you can support any MBIM modem.
Adding support for the MS command doesn't buy you any additional

> and make sure that all non-volatile memory is already written.

How does that help at all?  The firmware cannot *depend* on HOSTSHUTDOWN
notifications because it is obviously not mandatory.  Besides, even if
you do consider anything specified by MS mandatory: We all know that
systems crash.  Even a MS OS can sometimes crash I'm told :-) Which
means that the firmware has to implement foolproof NV updates in any

And that is not difficult at all.  NV writes are rare and can be slow.
Any firmware returning success on a NV writing command without ensuring
that the value is actually written, is so brain-dead that it doesn't
deserve any support at all.  I certainly don't think we should encourage
anything of the sort.


More information about the libmbim-devel mailing list