Re: USB card reader autosuspend

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

 



Am Montag, 16. August 2010, 16:04:52 schrieb Alan Stern:
> On Sun, 15 Aug 2010, Oliver Neukum wrote:
> 

> > Yes, that is true. But where is the connection to open/close?
> 
> When the device file is closed, the sd driver tells the device to 
> synchronize its cache.  While the file is open, we don't know whether 
> or not the cache has been written back.  While this may not matter for 
> flash drives, it does matter for other kinds -- and I wanted the 
> initial patch to work with a broad range of devices.

Don't we sync cache in sd when suspend() is called?


> At the moment it appears that we have three possible criteria for when 
> to power-down a SCSI drive:
> 
> 	When the device file is closed;
> 
> 	When the device file is closed and no medium is present

That is a degenerate case

> 	(or maybe just when no medium is present);

This is not.
 
> 	After a user-specified idle timeout.
> 
> The second is basically a degenerate subcase of the first, to be used
> with things like card readers that report a media change whenever they
> power back up.  Do you have any additional suggestions before I post
> something on linux-scsi?

My concern is that I doubt that cases 1 and 3 are distinct. Now as you can
surely suspend an open device without medium provided you reawaken
it for a command, I don't see the case for tracking open/close.

	Regards
		Oliver

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux