Google
  Web www.spinics.net

USB resume guarantees

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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.

- The system powers down as expected.

- I power it up again.

- The USB subsystem (compiled with CONFIG_USB_DEBUG) syslogs
  "root hub lost power or was reset" for all the USB busses.

- My driver's disconnect method is called. *Not* the resume
  method, *not* the reset_resume method, *just* the disconnect
  method.

- My driver's probe method is called.

- Driver operation is blocked because the tasklet is still
  disabled. There are tasklet_enable() calls in my resume and
  reset_resume methods, but those were never called.

- When I unplug the device to clear up the condition, khubd
  and ksoftirqd start hogging my CPU.

From reading Documentation/usb/power-management.txt I gathered
the impression that suspend and resume/reset_resume calls would
be paired, iow I could rely on either resume or reset_resume
being called once for every call of suspend, but obviously that
ain't so. So what are the possible sequences of events my driver
must be prepared to cope with?

Thanks
Tilman

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

Attachment: signature.asc
Description: OpenPGP digital signature

-------------------------------------------------------------------------
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/
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux