On Wed, 16 Jan 2008, Oliver Neukum wrote:

> > This entire issue needs more thought.  There must be plenty of ioctl 
> > calls which shouldn't force a device to remain resumed.
> 
> Sure. The question is whether it is worth a lot of effort to filter them.
> Are ioctl()s on block devices common?

I have no idea.  My guess is that they are not, other than for devices
not holding filesystems (e.g., audio CDs).

> > Also, your implementation in terms of a single bit will work only for
> > single-open devices.  If multiple-open is allowed then something would
> > have to be stored in the file structure.  More generic code...
> 
> Why? I don't think you can assume that a user intends an ioctl() to be
> "valid" only for the duration of that particular file. I intentionally put the
> put into release which is called for the last close().

The only scenario where this would matter is when there are two 
overlapping open calls, of which one uses ioctls and the other does 
doesn't.  I can't think of any examples, except perhaps where somebody 
does an ioctl on a mounted device (note that mounting a device does an 
"open").  In that case you wouldn't want the autosuspend prevention to 
continue until the device is unmounted.

Alan Stern

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

Reply via email to