Is it necessary to disable modem before powering it down?
Dan Williams
dcbw at redhat.com
Wed Feb 19 16:58:36 PST 2014
On Wed, 2014-02-19 at 16:54 -0800, Thieu Le wrote:
> In this particular case, the command AT%DPDNACT=0 took longer than 10s,
> which is too long when the user suspends the system.
>
> Thanks, I'll take a look at the internal states and see if we can reset it
> without going through a full disable.
We could either do a quick fix or a better fix.
quick fix: add a "will power down next" flag to the disable codepaths,
which you would then check and just not call %DPDNACT if we were in fact
about to power down next.
better fix: what I described earlier; split out any of the cleanup logic
so that it could be called from both disable and power-down, and then
allow power-down without first doing disable.
Your choice :)
Dan
>
>
> On Wed, Feb 19, 2014 at 4:48 PM, Dan Williams <dcbw at redhat.com> wrote:
>
> > On Wed, 2014-02-19 at 14:21 -0800, Thieu Le wrote:
> > > Hello,
> > >
> > > I am trying to solve a problem during our system suspend where the
> > disable
> > > modem step takes a long time and it would be quicker to just go straight
> > to
> > > modem power down.
> > >
> > > mm-iface-modem.c:handle_set_power_state_auth_ready() checks to make sure
> > > the modem is disabled before allowing it to be powered down. Is this
> > done
> > > because some modems require it to be in a disabled state before allowing
> > > the power down?
> >
> > Out of curiosity, which command takes too long?
> >
> > I think this is done mostly to ensure that internal stuff is cleaned up
> > correctly; like timeouts, polling the modem for status, and other things
> > that may have been set up during the enable state. I don't think most
> > modems would care about being disabled if you're just going to CFUN=0
> > them.
> >
> > If we were able to ensure that these things were properly cleaned up,
> > then we could jump directly to the power down state. The way to do that
> > would probably be to identify what gets torn down during 'disable',
> > split that out into separate functions that could be called from both
> > disable and power down, and then do that from both places.
> >
> > Dan
> >
> >
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
More information about the ModemManager-devel
mailing list