MS specific device services

Bjørn Mork bjorn at mork.no
Wed Feb 26 04:54:08 PST 2014


Aleksander Morgado <aleksander at aleksander.es> writes:

> 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...

The "maybe" makes the behaviour unpredictable.  What we can predict is
that every firmware engineer will add their own touch to the feature :-)

And *if* the device shuts down completely (or at least shuts down the
USB controller), then this command is dangerous without having some way
to programmatically toggle power to the device.  You will then be stuck
in a state you cannot get out of until "something else" toggles the
device power.

And if you do have some way to turn on and off power to the modem (like
some host firmware rfkill implementation or the new USB port power API),
then you might as well use that to power the modem off in the first
place.

If you don't have any external power control, then you are much better
off telling the modem to go into the lowest possible power state without
shutting down the USB controller completely.  That is done by simply
turning off the radio and doing a USB suspend.  Sane modems will be able
to sleep pretty deep in such a state, but still resume on USB activity
so that you can manage it.



Bjørn


More information about the libmbim-devel mailing list