On Thu, Feb 03, 2005 at 10:56:05AM -0500, Alan Stern wrote:

> Basically the situation is this:  There's a config option for usb-storage 

USB_STORAGE_RW_DETECT - a bad idea - it must not be necessary to recompile
the kernel (or at least usb-storage) when encountering a bad device.
Many users get their kernels from elsewhere and are unable to compile.

> to select whether or not the driver should allow checking for 
> write-protection on new devices.  The majority of devices support this 
> check with no difficulty, but there are a few that choke on it.  (That's 
> part of the reason we made it configurable -- the other part is that 
> earlier versions of Linux performed the check in a slightly different way 
> which was much more likely to cause problems.)
> 
> Now there's a proposal to make this be a module parameter rather than a
> config option, so that it can be changed on-the-fly via sysfs without
> having to rebuild usb-storage.

A big improvement.

> The bad aspect of doing this is that it
> would also eliminate the nice explanatory help message in the Kconfig
> file, so the background information wouldn't be so easily available to
> users any more.

Kernel configuration time is not the time to feed users with information.
There are thousands of parameters. A parameter is a sign of weakness:
I have no idea how to make this work, please figure it out for yourself.

> Suggested actions are:
> 
>       Move the explanation into the FAQ on www.linux-usb.org (a good
>       idea in any case).  Not least of the advantages is that it would
>       then be findable by Google.

Yes.

>       Change the setting to a module parameter, and _keep_ the config
>       option -- but make the config option control only the initial
>       default value of the parameter.

No. The config option is bad. You yourself have to determine the
initial default value.

Imagine a distribution. They have to do something for thousands
of users, many of whom are unable to compile kernels.
If it regularly happens that RW investigation leads to a hang,
and there is a great variety of devices where this happens,
then do not investigate RW.
If only two devices are known that are bad, mark them in unusual_devs.h
and make the default to determine RW, with a module parameter to
override for new unknown bad cases.
Nobody is in a better position to determine the default than you are.

>       Go ahead and do the complete changeover now (or as soon as the
>       FAQ is updated).

Yes.

> P.S.: This raises the issue of documenting a bunch of module parameters 
> added to the USB subsystem fairly recently.  What's the best way to do 
> this?  Add entries to Documentation/kernel-parameters.txt?  Put 
> descriptions on the linux-usb FAQ?  Both?

Both.
kernel-parameters.txt is obligatory, all other places are nice.

Andries


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to