On Sun, 14 Sep 2014, Mark wrote:

> Hi,
> 
> Shuttle Technology/SCM Microsystems was the OEM manufacturer of SCSI-USB
> converter cables sold by various companies including Adaptec [untested
> patch posted recently], Ariston Technologies, Belkin [*], Buffalo,
> Entrega/Xircom [patch posted recently], Microtech [*], Newer Technology
> [*], Olympus[*]
> *: quirk already in unusual-devs.h
> 
> The ability to specify the SCM_MULT_TARG quirk on the command line could
> be useful. At least the Ariston and Buffalo products don't have entries in
> unusual-devs.h. I hope to write a patch, but would like some advice on the
> best approach.

Devices with this capability are so rare, it didn't seem worthwhile 
adding it to the list of recognized quirks for the module parameter.

> The letter "t" is free; should I use that to signify the SCM_MULT_TARG
> quirk? In usb_stor_adjust_quirks() I'd add
>       case 't':
>               f |= US_FL_SCM_MULT_TARG;
>               break;
> 
> usb_stor_euscsi_init is the initFunction for all SCM_MULT_TARG quirks. In
> get_device_info(), after the call to usb_stor_adjust_quirks() I could add
> code like
>       if (us->fflags & US_FL_SCM_MULT_TARG) {
>               unusual_dev->initFunction = usb_stor_euscsi_init;
>       }
> 
> Alternatively, similar code could be added before the call to initFunction
> in usb_stor_acquire_resources():
>       if (us->fflags & US_FL_SCM_MULT_TARG) {
>               us->unusual_dev->initFunction = usb_stor_euscsi_init;
>       }
> 
>       /* Just before we start our control thread, initialize
>        * the device if it needs initialization */
>       if (us->unusual_dev->initFunction) {
>               p = us->unusual_dev->initFunction(us);
>       ...
> 
> Is one of those options preferable? Or maybe something else?

It's probably better just to rely on entries to the unusual_devs.h
file.  Those are automatically be available to anyone with an
up-to-date kernel, with no need for messing around with module
parameters.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to