Re: [PATCH 2/3] usb: Take attribute avoid_reset_quirk out of usb device's attribute group

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

 



On Tue, 31 Jul 2012, Bjørn Mork wrote:

> Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> writes:
> > On Tue, 31 Jul 2012, Bjørn Mork wrote:
> >
> >> IMHO that should have been the default for any composite device, but
> >> whatever..  I don't think it's very nice of usb-storage to reset the
> >> device if there are drivers bound to other functions.
> >
> > That's why we have pre_reset and post_reset callbacks.  The alternative 
> > is to lose access to all the mounted filesystems on the mass-storage 
> > device, which isn't very nice either.
> 
> Well, you are then saying that usb-storage has priority over any other
> function and that is often wrong IMHO.

No, I'm not saying that at all.  The situation is perfectly symmetric.  
Just as usb-storage is free to interrupt other drivers by doing a
reset, so the other drivers are free to interrupt usb-storage by doing
a reset.

>  There are many newer composite
> devices where the usb-storage function is thrown in as a bonus most
> users never will touch, where the main function can be modem or printer
> or whatever.  Letting the usb-storage driver reset these devices is bad.
> 
> Ref for example http://comments.gmane.org/gmane.linux.usb.general/60055

If the mass-storage function isn't going to be used then usb-storage
could be unbound from the device.  Or (a better solution IMO), if the
manufacturers would design their mass-storage functions without bugs
then no resets would be needed.

Another alternative is for the other drivers to delay the reset (by 
sleeping in their pre_reset callbacks) until they can handle the reset 
safely.

The kernel doesn't know which functions the user is interested in.  It 
has no basis for saying "The user doesn't care about the mass-storage 
function so don't let usb-storage issue any device resets".

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


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

  Powered by Linux