Re: [RFC PATCH] usb: storage: uas: limit consecutive device resets in error handling
From: Sergey Senozhatsky
Date: Wed Jul 01 2026 - 02:01:51 EST
On (26/07/01 14:57), Sergey Senozhatsky wrote:
> On (26/07/01 07:38), Greg KH wrote:
> > > +static int uas_reset_limit = 3;
>
> This obviously wanted to be 0 by default (just a side note).
>
> > > +module_param_named(reset_limit, uas_reset_limit, int, 0644);
> > > +MODULE_PARM_DESC(reset_limit, "Maximum number of consecutive device resets during error handling before failing");
> >
> > This is not the 1990's, we do not add module parameters for issues that
> > should be properly solved either automatically, or on a per-device
> > basis.
> >
> > There's no way that ChromeOs wants to attempt to track this module
> > parameter as a bootline config option, right?
>
> Can you please elaborate on "properly solved either automatically,
> or on a per-device basis". I don't know how to break that endless
> reset loop otherwise. I'm open to any suggestions, the patch is RFC
> for a reason.
I can imagine uas_reset_limit being auto-calculated based on SCSI
timeout (30 seconds) and HUNG_TASK_TIMEOUT (if set). Will that
work? I don't know if all those timeouts can be clearly exposed
to the UAS driver (or should they be in the first place).