public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* USB multi card reader == SCSI multi lun target
@ 2003-09-02  0:31 Douglas Gilbert
  2003-09-02  0:41 ` Stephen J. Gowdy
  0 siblings, 1 reply; 2+ messages in thread
From: Douglas Gilbert @ 2003-09-02  0:31 UTC (permalink / raw)
  To: linux-scsi

This is probably old news to USB folks but those
nifty little USB multi card readers (e.g. CF, SD,
MMC, SMC cards etc) appear in Linux as multi lun
targets.

Most distros only scan for lun 0 **. So to see
luns > 0, commands like these are needed:

echo "scsi add-single-device 1 0 0 1" > /proc/scsi/scsi
echo "scsi add-single-device 1 0 0 2" > /proc/scsi/scsi
echo "scsi add-single-device 1 0 0 3" > /proc/scsi/scsi

The above sequence was needed for a 4 slot multi card reader.
Following is some /proc/scsi/scsi output after an
"scsi add-single-device 1 0 0 1" in a 2 slot multi card reader.
Notice the end of the model string tells you what type of
card is read at that lun.

# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 02 Lun: 00
   Vendor: hp       Model: scanjet 7400c    Rev: 0.8A
   Type:   Scanner                          ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 00
   Vendor: Generic  Model: USB Storage-SMC  Rev: 0090
   Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi1 Channel: 00 Id: 00 Lun: 01
   Vendor: Generic  Model: USB Storage-CFC  Rev: 0090
   Type:   Direct-Access                    ANSI SCSI revision: 02


** Most distros don't set CONFIG_SCSI_MULTI_LUN because some
"scsi" devices answer all luns. I think that bug in ide-scsi
has been fixed in lk 2.4.22 (I've sent patches to this list
for 2.4 and 2.5 to fix this). A scipt may be useful to scan
the output of /proc/scsi/scsi for this class of device and if
found manually scan for luns > 0.

Doug Gilbert



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: USB multi card reader == SCSI multi lun target
  2003-09-02  0:31 USB multi card reader == SCSI multi lun target Douglas Gilbert
@ 2003-09-02  0:41 ` Stephen J. Gowdy
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen J. Gowdy @ 2003-09-02  0:41 UTC (permalink / raw)
  To: Douglas Gilbert; +Cc: linux-scsi

BTW, this is in the Linux USB FAQ;

http://www.linux-usb.org/FAQ.html#ts9


On Tue, 2 Sep 2003, Douglas Gilbert wrote:

> This is probably old news to USB folks but those
> nifty little USB multi card readers (e.g. CF, SD,
> MMC, SMC cards etc) appear in Linux as multi lun
> targets.
>
> Most distros only scan for lun 0 **. So to see
> luns > 0, commands like these are needed:
>
> echo "scsi add-single-device 1 0 0 1" > /proc/scsi/scsi
> echo "scsi add-single-device 1 0 0 2" > /proc/scsi/scsi
> echo "scsi add-single-device 1 0 0 3" > /proc/scsi/scsi
>
> The above sequence was needed for a 4 slot multi card reader.
> Following is some /proc/scsi/scsi output after an
> "scsi add-single-device 1 0 0 1" in a 2 slot multi card reader.
> Notice the end of the model string tells you what type of
> card is read at that lun.
>
> # cat /proc/scsi/scsi
> Attached devices:
> Host: scsi0 Channel: 00 Id: 02 Lun: 00
>    Vendor: hp       Model: scanjet 7400c    Rev: 0.8A
>    Type:   Scanner                          ANSI SCSI revision: 02
> Host: scsi1 Channel: 00 Id: 00 Lun: 00
>    Vendor: Generic  Model: USB Storage-SMC  Rev: 0090
>    Type:   Direct-Access                    ANSI SCSI revision: 02
> Host: scsi1 Channel: 00 Id: 00 Lun: 01
>    Vendor: Generic  Model: USB Storage-CFC  Rev: 0090
>    Type:   Direct-Access                    ANSI SCSI revision: 02
>
>
> ** Most distros don't set CONFIG_SCSI_MULTI_LUN because some
> "scsi" devices answer all luns. I think that bug in ide-scsi
> has been fixed in lk 2.4.22 (I've sent patches to this list
> for 2.4 and 2.5 to fix this). A scipt may be useful to scan
> the output of /proc/scsi/scsi for this class of device and if
> found manually scan for luns > 0.
>
> Doug Gilbert
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

--
 /------------------------------------+-------------------------\
|Stephen J. Gowdy                     | SLAC, MailStop 34,       |
|http://www.slac.stanford.edu/~gowdy/ | 2575 Sand Hill Road,     |
|http://calendar.yahoo.com/gowdy      | Menlo Park CA 94025, USA |
|EMail: gowdy@slac.stanford.edu       | Tel: +1 650 926 3144     |
 \------------------------------------+-------------------------/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-09-02  0:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-02  0:31 USB multi card reader == SCSI multi lun target Douglas Gilbert
2003-09-02  0:41 ` Stephen J. Gowdy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox