Re: USB resume guarantees

Tilman Schmidt <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Sun, 11 Nov 2007 19:14:41 -0800, David Brownell wrote:
> On Sunday 11 November 2007, Tilman Schmidt wrote:
>> While trying to add suspend/resume support to the USB drivers I
>> maintain, I came across the following unexpected sequence of
>> events with kernel 2.6.24-rc2:
>> 
>> - I request suspend to disk by doing
>>   echo shutdown > /sys/power/disk ; echo disk > /sys/power/state
>> 
>> - My driver's suspend method is called, which uses
>>   tasklet_disable() to prevent a tasklet from resubmitting URBs.
> 
> It should also make sure no URBs are pending.

Sure, it does that too. Sorry for not mentioning it.

>> - My driver's disconnect method is called. *Not* the resume
>>   method, *not* the reset_resume method, *just* the disconnect
>>   method.
> 
> Which is perfectly fine.  If someone disconnected the device
> while the system was suspended, that's what would happen.

Ok, thanks for clearing that up. I'll adapt my drivers' suspend
logic accordingly.

>> From reading Documentation/usb/power-management.txt I gathered
>> the impression that suspend and resume/reset_resume calls would
>> be paired,
> 
> In the normal case, yes.  (Though I don't think I've doe
> more than skim that text ...)

I'll translate "in the normal case" to "not necessarily" for my
purposes. :-)

Thanks,
Tilman

-- 
Tilman Schmidt                    E-Mail: [email protected]
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
signature.asc (application/pgp-signature, 250 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHOBfhQ3+did9BuFsRAt/bAJ9Kb3CJ+mA3cJWH9YkSVXsx/BQDAgCfWKTM
Mwnpd+xlpSCWME29CHAzycE=
=bLPx
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.