Skip to contentSkip to conversation

Status of storage autosuspend

DISCUSSION Pavel Machek 3 participants 5 messages Feb 18, 2008 – Feb 20, 2008

lore
Share & tools
lore
#0 lore raw

Hi!

What is the status of USB storage/SCSI autosuspend patches? They work nicely here ;-).
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw
Quoted 4 lines · Pavel Machek

Hi!

What is the status of USB storage/SCSI autosuspend patches? They work nicely here ;-).

I could submit them, but there is one outstanding problem I would like to solve first. Maybe you can suggest a solution.

The problem is how to handle SG_IOCTL calls. It seems that the only safe thing to do is to force an autoresume and prevent the device from autosuspending until the device file is closed. Unfortunately the SG_IOCTL stuff is all handled inside the block layer, and there's no apparent way (other than some dreadful hack) of passing the necessary information down to the SCSI layer.

Should we ignore this issue and submit the patches anyway?

Alan Stern

#2 lore raw

Hi!

Quoted 6 lines
Quoted 2 lines

What is the status of USB storage/SCSI autosuspend patches? They work nicely here ;-).

I could submit them, but there is one outstanding problem I would like to solve first. Maybe you can suggest a solution.

Quoted 6 lines

The problem is how to handle SG_IOCTL calls. It seems that the only safe thing to do is to force an autoresume and prevent the device from autosuspending until the device file is closed. Unfortunately the SG_IOCTL stuff is all handled inside the block layer, and there's no apparent way (other than some dreadful hack) of passing the necessary information down to the SCSI layer.

Hmm...

Quoted 1 line

Should we ignore this issue and submit the patches anyway?

I think you should. "Easy" (and clean) solution to that issue is to just return -EPERM from SG_IOCTL if autosuspend is configured in ;-).

Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#3 lore raw
Quoted 4 lines · Pavel Machek
Quoted 1 line

Should we ignore this issue and submit the patches anyway?

I think you should. "Easy" (and clean) solution to that issue is to just return -EPERM from SG_IOCTL if autosuspend is configured in ;-).

:-)

Okay, I'll update the patches to 2.6.25-rc2 and submit them in a few days. (Actually the SCSI patch has to go in first and the usb-storage patch afterward, which will probably cause it to be delayed one kernel version. I don't know any good way to handle these cross-subsystem updates...)

Alan Stern

#4 lore raw
Quoted 7 lines · Alan Stern
Quoted 4 lines · Pavel Machek
Quoted 1 line

Should we ignore this issue and submit the patches anyway?

I think you should. "Easy" (and clean) solution to that issue is to just return -EPERM from SG_IOCTL if autosuspend is configured in ;-).

Quoted 7 lines

:-)

Okay, I'll update the patches to 2.6.25-rc2 and submit them in a few days. (Actually the SCSI patch has to go in first and the usb-storage patch afterward, which will probably cause it to be delayed one kernel version. I don't know any good way to handle these cross-subsystem updates...)

Push the usb-storage one through the scsi tree as well. The subsystem maintainers handle this kind of thing all the time (for example, a sysfs feature is about to go in through the ocfs tree for this very reason.)

thanks,

greg k-h