kern/71605: umass doesn't recognize multiple slots of many-in-one USB card reader/writer

Martin Horneffer maho at horneffer.dyndns.org
Sat Sep 11 15:20:21 PDT 2004


>Number:         71605
>Category:       kern
>Synopsis:       umass doesn't recognize multiple slots of many-in-one USB card reader/writer
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 11 22:20:20 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Martin Horneffer
>Release:        4.10-RELEASE
>Organization:
Deutsche Telekom T-Com
>Environment:
FreeBSD james.intranet 4.10-RELEASE FreeBSD 4.10-RELEASE #27: Sat Sep 11 23:39:15 CEST 2004     toor at james.intranet:/usr/src/sys/compile/JAMES  i386
>Description:
When a "may-in-one" USB card reader (e.g. "9in1") is connected, only one out of (in my case) 4 slots is discovered and assigned a da device.

Only one LUN (0) is scanned; the card readers address their other slots with different LUNs.

The problem ist the same whether the USB device is persent at boot time or connected later.
>How-To-Repeat:
The same happens with two different card readers I have:

umass0: ICSI 2.0 Card Reader, rev 2.00/1.3a, addr 2
umass1: Generic USBMass Storage Device, rev 1.10/1.71, addr 2

>Fix:
1) use "camcontrol .. rescan" with the proper LUN. You have to exactly know the LUN.

2) Apply following patch to the kernel:

--- sys/dev/usb/umass.c.orig    Thu May  6 15:16:06 2004
+++ sys/dev/usb/umass.c Sat Sep 11 23:28:40 2004
@@ -2147,7 +2147,7 @@
                USBDEVUNIT(sc->sc_dev), CAM_LUN_WILDCARD));

        if (xpt_create_path(&path, xpt_periph, cam_sim_path(umass_sim),
-                           CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD)
+                           USBDEVUNIT(sc->sc_dev), CAM_LUN_WILDCARD)
            != CAM_REQ_CMP)
                return;



Result: now all 4 slots are automatically discovered:

da0 at umass-sim0 bus 0 target 0 lun 0
da0: <Generic USB Reader-SMC 2002> Removable Direct Access SCSI-2 device
da0: 650KB/s transfers
da0: Attempt to query device size failed: NOT READY, Medium not present
da1 at umass-sim0 bus 0 target 0 lun 1
da1: <Generic USB Reader-CF 2002> Removable Direct Access SCSI-2 device
da1: 650KB/s transfers
da1: 30MB (62592 512 byte sectors: 64H 32S/T 30C)
da2 at umass-sim0 bus 0 target 0 lun 2
da2: <Generic USB Reader-SD 2002> Removable Direct Access SCSI-2 device
da2: 650KB/s transfers
da2: Attempt to query device size failed: NOT READY, Medium not present
da3 at umass-sim0 bus 0 target 0 lun 3
da3: <Generic USB Reader-MS 2002> Removable Direct Access SCSI-2 device
da3: 650KB/s transfers
da3: Attempt to query device size failed: NOT READY, Medium not present

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list