MS specific device services

Aleksander Morgado aleksander at aleksander.es
Wed Feb 26 04:13:29 PST 2014


On 26/02/14 12:09, 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
> benefit. 
> 
>> > 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
> case.
> 
> 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.

That notification is sent from host to device to notify that the host is
shutting down, so maybe the device can also use that notification to
fully shutdown itself (e.g. similar to what some devices do when they
receive CFUN=0). If only the MS documentation explained why it was
introduced that command...

-- 
Aleksander
https://aleksander.es


More information about the libmbim-devel mailing list