1 Aug 2009 01:00
Re: Autosuspend for mass storage?
Am Samstag, 1. August 2009 00:01:27 schrieb Sarah Sharp:
> Hi Oliver,
Hello,
> I know you worked on several versions of a mass storage device
> autosuspend patch.
For the discussion I am attaching what I found in my archives.
It is a bit incomplete in hindsight. We should definitely do autopm_get
in the open methods of sg and st.
Be careful they surprised Alan and maybe caused convultions.
Regards
Oliver
--
--- a/drivers/usb/storage/usb.c 2007-09-27 13:33:31.000000000 +0200
+++ b/drivers/usb/storage/usb.c 2007-09-27 13:30:21.000000000 +0200
<at> <at> -182,33 +182,100 <at> <at> static struct us_unusual_dev us_unusual_
static int storage_suspend(struct usb_interface *iface, pm_message_t message)
{
+ struct device *child;
struct us_data *us = usb_get_intfdata(iface);
+ struct Scsi_Host *host = us_to_host(us);
+ struct scsi_device *sdev, *sdev2 = NULL;
+ int err = 0;
+
+ /* In case of autosuspend we need to do extra work to flush
(Continue reading)
This patch had the substantial drawback of doing a ton of work in
usb-storage which really ought to be done within the SCSI layer.
Alan Stern
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to
RSS Feed