On Mon, 2 Mar 2009, Thadeu Lima de Souza Cascardo wrote: > Hello, > > Some time ago, I've worked with a Sandisk storage device, which could > not resume properly. I've found out that it was timing out when > receiving requests. I could mount it right after resuming, but using a > mounted device was not possible. Since this device is the only storage > present in some mobile, it is used as the root device and cannot be > unmounted. > > I've thought this was a bug in the device itself and not a problem in > the bus or host controller, since other devices worked pretty well. > After doing some tests, I've realized that doing a rescan in the device > before accessing it worked. And setting manage_start_stop as true does > this automatically when resuming for us. > > Thus, the patch below. I would like some comments about this particular > issue and, if the solution is acceptable, I will send a proper commit > log. Maybe there doesn't need to be a patch for this at all. Can't you get the same result by writing a udev rule? In fact, isn't that how the manage_start_stop flag is intended to be set? As for the patch itself... You are setting the flag in the wrong place. The manage_start_stop flag applies only to SCSI disk devices AFAICT. (The sysfs interface isn't present if the device isn't a disk, at any rate.) So you should set the flag in the code that applies to disks. Also, this patch won't apply to the current development tree, because there have been several changes to usb-storage's recently. In particular there is new code allowing quirk flags to be set by a module parameter, and your new flag (if it is accepted) should be added to this mechanism. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html