On Tue, 31 Aug 2010, Oliver Neukum wrote: > Am Dienstag, 31. August 2010, 16:13:26 schrieb Alan Stern: > > Here's a somewhat related question. Consider those buggy USB card > > readers (when restored to full power, they always report that the card > > has been changed even if it hasn't). What's the best way to handle > > them? I see two possibilities. > > > > We could simply avoid autosuspend whenever a card is present. Or we > > could allow autosuspend and then ignore the media-change notification > > when the reader is resumed. (But I suspect that's not a good idea, > > since real media changes would be ignored too unless the system > > constantly polled the device status.) Either way, we'd need the user > > to tell the kernel what to do. > > Worse. What happens when the system sleeps and the device does not > loose power? You mean the device remains at full power during system sleep? How could that happen? > > Furthermore, other non-buggy devices with removable media might require > > special treatment. For example, the user might want to have two > > different autosuspend timeouts: one for media present and one for media > > not present. If the media-present timeout is set to -1 then it could > > have the effect of preventing autosuspend. > > That is a good plan, as it leaves the problem to someone else. It's still not great. It would require putting in all those settings for each LUN. In a multi-card reader, each card type generally has its own LUN. For those buggy readers, it would be better to have something which could be implemented as a sysfs attribute in usb-storage. 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