Re: how to make a storage device suspend between commands to an attached disk

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

 



On Mon, 16 Jan 2012, Oliver Neukum wrote:

> Hi,
> 
> I am working on getting this solved and a couple of questions have arisen:

This is not an easy thing to do correctly.  For example, consider the
fact that suspending a bus-powered rotating disk drive will require
sending commands to write the cache and spin down the disk.  And don't
forget the fact that many card readers signal a media change when they
resume.

When I was thinking about this sort of thing, I came to the conclusion
that the right place to do it would be in the block layer core.  SCSI
requests all funnel through there.

> 1. who is responsible for resuming a device when a command arives?
> the storage driver or sd?
> If sd the problem is that sd doesn't know when a host can suspend attached disks.

Currently, nobody is responsible.  That's because no commands arrive 
unless the device has been opened (except for trivial things like the 
initial scanning), and opening the device file causes an autoresume.

> 2. Do commands need to be marked for relating to PM tasks?

Yes, they do.

Alan Stern

--
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