public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: linux-scsi@vger.kernel.org
Subject: USB multi card reader == SCSI multi lun target
Date: Tue, 02 Sep 2003 10:31:59 +1000	[thread overview]
Message-ID: <3F53E4FF.80401@torque.net> (raw)

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



             reply	other threads:[~2003-09-02  0:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-09-02  0:31 Douglas Gilbert [this message]
2003-09-02  0:41 ` USB multi card reader == SCSI multi lun target Stephen J. Gowdy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F53E4FF.80401@torque.net \
    --to=dougg@torque.net \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox