Re: [PATCH 3/3] usb: Change persist_enabled when attribute avoid_reset_quirk is modified

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

 



On Mon, 30 Jul 2012, Oliver Neukum wrote:

> On Monday 30 July 2012 10:39:50 Alan Stern wrote:
> > > this leads to behavior that is not easy to predict or understand.
> > > It would be cleaner to leave the flag alone and check for the quirk
> > > in addition for the flag when the check is done.
> > 
> > I disagree.  Leaving the flag set but then not implementing the 
> > persist behavior would be confusing also.  Maybe even worse.
> 
> But we cannot guarantee persistance anyway. We can only try.
> But trying makes no sense if we are sure to fail.
> 
> In addition, we even undermine the file permission to a small
> extent if we allow one attribute to alter another attribute.

Putting all these thoughts together leads to a single conclusion:

	We should not change persist_enabled when avoid_reset_quirk
	gets set.

As you say, coupling the two attributes is confusing and circumvents
the permissions.  If the device needs a reset-resume, we'll go ahead
and try to do it.  If the reset fails because the firmware gets erased,
at least there will be an error message in the system log to explain
what went wrong.  (But it's still a good idea to add a sentence about
this issue to the Documentation file.)

Whereas if we silently change attribute values or silently skip a 
reset-resume when RESET_MORPHS is set, there will be no indication in 
the log or anywhere else to tell the user what happened.

Besides, as far as I can tell the RESET_MORPHS quirk is used in only 
one place (in usb-storage).  We don't even have any existing quirk 
entries that set this flag!

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