On Mon, 23 Jul 2012, Oliver Neukum wrote: > On Monday 23 July 2012 11:08:47 Sarah Sharp wrote: > > > By disabling this, you are not creating a real-world situation. Those > > > disks need to be polled for a reason, right? > > > > Tianyu is trying to test the port power off mechanism with USB 3.0 > > devices, to make sure the patches work on USB 3.0. Since the majority > > of USB 3.0 devices are storage, he needs to disable the polling to run > > tests. > > > > Yes, killing udev is an extreme measure, and using Alan's suggestion to > > stop the block device polling file is better. Yes, this is just a test > > and not something we can do in a real Linux distro. > > This would be an ideal time to extend the API to allow a driver to set > the timeout for autosuspend to zero. The storage driver should use > this if all its children have reported -ENOMEDIUM or are offlined. The runtime PM framework already provides such an API, although the USB layer doesn't have a wrapper for it. I suggest that rather than have usb-storage mess around with details like no medium or offline, the SCSI layer should handle such things. Lin Ming's patches (not yet accepted) allow SCSI disks to autosuspend at appropriate times. When this happens, usb-storage might as well autosuspend almost immediately. In other words, userspace could be encouraged to set the autosuspend delay for USB mass-storage devices to something a lot smaller than 2 seconds. I'm not so sure it's a good idea for usb-storage to do this, because it might end up overwriting a setting given by the user. Also, it's probably not a good idea for composite devices. 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