Bug 85851 - Cardreader problem and CONFIG_SCSI_MULTI_LUN in .config file
Summary: Cardreader problem and CONFIG_SCSI_MULTI_LUN in .config file
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 8.0
Hardware: i686
OS: Linux
Target Milestone: ---
Assignee: Tom Coughlan
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2003-03-09 12:38 UTC by Henry Leung
Modified: 2007-04-18 16:51 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Last Closed: 2004-09-02 04:30:32 UTC

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:433 0 normal SHIPPED_LIVE Updated kernel packages available for Red Hat Enterprise Linux 3 Update 3 2004-09-02 04:00:00 UTC

Description Henry Leung 2003-03-09 12:38:04 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003

Description of problem:
Dear developers,

  I got a Filand 6-in-1 cardreader with multiple slots. It's upper slot is SCSI
LUN 0, and the lower slot is LUN 1. Therefore to make it works properly, the
kernel must support multiple SCSI LUN, i.e. set CONFIG_SCSI_MULTI_LUN=y in the
.config file.

  Unfortunately the RHL kernel has turned it off. However, as this kind of
cardreaders are getting popular, I suggest the kernel should enable multiple LUN
by default.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Press Ctrl-Alt-F1 and login as root.
2. Attach a Filand 6-in-1 cardreader to one of the USB ports (actually the
situation should be the same for all kinds of cardreaders those support multiple
card types)
3. Type cat /proc/scsi/scsi
4. Observe the LUN number detected.

Actual Results:  The kernel only detects LUN 0 (the LUN of the upper slot). The
lower slot cannot be detected

Expected Results:  To make the lower slot working, it should be able to detect
LUN 1.

Additional info:

To make this work, I have to set the parameter CONFIG_SCSI_MULTI_LUN=y in the
config file and re-compile the kernel. Then it works:

[hleung@localhost linux.20-ac2]$ cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor:          Model: USB Card Reader  Rev: 3.02
  Type:   Direct-Access                    ANSI SCSI revision: 02
Host: scsi0 Channel: 00 Id: 00 Lun: 01
  Vendor:          Model: USB Card Reader  Rev: 3.02
  Type:   Direct-Access                    ANSI SCSI revision: 02

[hleung@localhost linux.20-ac2]$

Comment 1 Arjan van de Ven 2003-03-09 12:41:50 UTC
there is a problme with making this the default: there are quite a few scsi
devices that will just lock up the scsi bus when this is in use. HOWEVER the
good news is that this is a runtime option....

Comment 2 Dan Berger 2003-08-17 05:43:17 UTC
following up on the last update:

this can be configured at runtime - add the following to /etc/modules.conf:

options scsi_mod max_scsi_luns=8

If you have something with more than 8 luns, change 8 to something higher.  (4
is probably a reasonable value as well, 8 is pretty arbitrary.)

The problem is that if you have a real scsi controller - this won't have any
effect.  See, if you have scsi hardware mkinitrd will include mod_scsi in your
initial ramdisk - so the module will get loaded without being passed that parameter.

One solution is to pass mkinitrd the --omit-scsi-modules - the other is to pass
the argument to the kernel via the bootloader. 

Unfortunately, these card readers are becoming more common - and this sort of
"black magic" to get them working is really annoying to a "normal user" (read
windows convert) not accustomed to tweaking config files.

Comment 3 Arjan van de Ven 2003-08-17 14:04:22 UTC
this is why we add all "known good" ones to the whitelist so that this becomes

Comment 4 Ben FrantzDale 2004-05-04 08:35:55 UTC
Another for the whitelist: 
vend/prod 0x781/0x830 is a SanDistk ImageMate. For more, see

Comment 5 Tom Coughlan 2004-05-04 12:21:17 UTC

Thanks for the information.  In order to update the whitelist I need
the exact vendor ID and product ID from the SCSI Inquiry data.  This
is shown by Linux in the /proc/scsi/scsi file after the device is
configured.  Does this device show exactly "SanDisk" and "ImageMate"
(case matters)?


Comment 6 Ben FrantzDale 2004-05-04 14:54:43 UTC
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: SanDisk  Model: ImageMate CF-SD1 Rev: 0100
  Type:   Direct-Access                    ANSI SCSI revision: 02

Comment 7 Jason Knight 2004-05-06 01:40:39 UTC
Another for whitelist (Cbox 3 5 1/2 bay with 6in1 card reader):

Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: CBOX3    Model: USB Storage-SMC  Rev: 300A
  Type:   Direct-Access                    ANSI SCSI revision: 02

Comment 8 Ben FrantzDale 2004-05-06 07:14:17 UTC
Out of curiosity, where does this whitelist live? Is it a file or is
it compiled into the driver or kernel?

Comment 9 Tom Coughlan 2004-05-06 13:10:59 UTC
For the 2.4 kernel, the whitelist is in drivers/scsi/scsi_scan.c

This is compiled and linked into scsi_mod.o.

Comment 10 Ernie Petrides 2004-06-16 07:25:23 UTC
A fix for this problem has just been committed to the RHEL3 U3
patch pool this evening (in kernel version 2.4.21-15.12.EL).

Comment 11 Tom Coughlan 2004-06-16 12:17:44 UTC
To be clear, the requests in comment #4 through 7 have been taken care
of in RHEL 3 U3:

+       {"SanDisk", "ImageMate", "*", BLIST_FORCELUN},
+       {"CBOX3", "USB", "*", BLIST_FORCELUN}, 

We will not be able to add the USB cardreader that was initially
requested in this BZ, because the "vendor" field in the Inquiry data
is blank.   

Comment 12 Jason Knight 2004-06-19 03:04:03 UTC
Will this also be taken care of in Fedora? Or should I create another
bug report for that? 

Comment 13 John Flanagan 2004-09-02 04:30:32 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.