RE: [PATCH] usb-storage: Optimize scan delay more precisely

From: Norihiko Hama
Date: Thu Mar 28 2024 - 19:38:56 EST


+AD4- +AD4- +AD4- Here's an approach that Greg might accept.
+AD4- +AD4- +AD4-
+AD4- +AD4- +AD4- Since we already have a delay+AF8-use module parameter, we could add a
+AD4- +AD4- +AD4- delay+AF8-use+AF8-ms parameter. The two module parameters would display the
+AD4- +AD4- +AD4- same value, but delay+AF8-use+AF8-ms would be in milliseconds instead of in
+AD4- +AD4- +AD4- seconds. (This is similar to what we did for the autosuspend and
+AD4- +AD4- +AD4- autosuspend+AF8-delay+AF8-ms sysfs attributes.)
+AD4- +AD4-
+AD4- +AD4- What about just changing the parser on the currently delay+AF8-use
+AD4- +AD4- parameter to accept an optional suffix? If it's just digits, it is in
+AD4- +AD4- seconds. If it ends in +ACI-ms+ACI-, then interpret it as milliseconds. This
+AD4- +AD4- would be backwards compatible with existing uses, give you the
+AD4- +AD4- flexibility you want, avoid adding another modules parameter, and
+AD4- +AD4- potentially be expandable in the future (if, for some reason, someone
+AD4- +AD4- wanted microseconds or kiloseconds).
+AD4-
+AD4- A little unconventional, I think (at least, I don't know offhand of any other module parameters or sysfs attributes that work this way), but it would work.
+AD4-
+AD4- Noriko, would you like to write a patch to do this?

Thank you for your advice.
I understand and will try to do that.

Best regards,
Norihiko Hama