Re: /sys/.../power/autosuspend format

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

 



Am Dienstag, 31. August 2010, 18:59:01 schrieb Alan Stern:
> On Tue, 31 Aug 2010, Oliver Neukum wrote:

> Ah yes.  In fact, that must be a problem even now.  At least adding
> autosuspend support won't make it any worse than it already is.

Oh, there's another little problem in autosuspend_check()

 			/* Don't allow autosuspend if the device will need
			 * a reset-resume and any of its interface drivers
			 * doesn't include support or needs remote wakeup.
			 */
			if (udev->quirks & USB_QUIRK_RESET_RESUME) {
				struct usb_driver *driver;

				driver = to_usb_driver(intf->dev.driver);
				if (!driver->reset_resume ||
						intf->needs_remote_wakeup)
					return -EOPNOTSUPP;

This means devices with this quirk will be suspended. Which in means
that medium change events will be lost. I think for devices with this quirk
we can autosuspend only if there's no medium present. Furthermore
you'll probably need to introduce a new flag to signal this requirement
to usbcore.

> > > For those buggy readers, it would be better to have something
> > > which could be implemented as a sysfs attribute in usb-storage.
> > 
> > Why usb-storage? Any drive for real rotational media has the same
> > requirement.
> > Waiting for minutes for a suspend without medium is ridiculous,
> > as is spinning down a disk after only two seconds.
> 
> Suggestions for a sysfs interface?  Should the sd driver add its own 
> "suspend_delay_no_medium" attribute?

Hm. I see no connection to sd. In fact I see no connection to block
devices. Tapes have this issue, too.

	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