Re: [PATCH] Set manage_start_stop for some USB storage devices by default

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

 



On Mon, Mar 02, 2009 at 02:42:15PM -0500, Alan Stern wrote:
> 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?

I did expect that doing it in user space would be the proper way. Any
tips on how to find out the USB id's given the disk?

> 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.

I thought on adding a quirk flag to the SCSI host and, then, testing
that in the SCSI code itself. Didn't think SCSI guys would like that.

> 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.

Also expected. But I didn't know about the new changes in the quirk
flags code. Which tree should I refer to regarding usb-storage or USB,
besides next and rc trees?

> Alan Stern
> 

Thank you very much for your prompt answer and advice.

Regards,
Cascardo.

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux