Bug 122119 - [umass] umass device causes creation of daX but not daXsX entries; CAM error
Summary: [umass] umass device causes creation of daX but not daXsX entries; CAM error
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 7.0-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-26 17:30 UTC by Matt D. Harris
Modified: 2017-12-31 22:37 UTC (History)
0 users

See Also:


Attachments
smime.p7s (4.28 KB, application/x-pkcs7-signature)
2008-03-27 13:46 UTC, Marcin Cieślak
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt D. Harris 2008-03-26 17:30:00 UTC
I believe this problem appears similar to, but not the same as those
described in usb/95037 and kern/114667 which are both open PR's.  Those
PR's are both on 6.1 however, and this occurs on 7.0-STABLE.  This
umass device worked as expected with FreeBSD 6.2 (which is why I do not
believe the two above referenced PR's are the same problem), however
upon moving to 7.0, it no longer works.  When plugged in, daX is
created, however the mountable slice (daXs1) is not.  Under FreeBSD 6.2,
daXs1 was created and was mountable/behaved normally.  The USB device in
question is a Motorola SLVR L7c phone with a 1gig MicroSD card installed.
The MicroSD card is what is presented by the phone to the host system as
a umass device, and is formatted msdosfs by the phone.  The phone is
visible and mounts just fine on my wife's Linux workstation, as well.
Other umass devices work fine for me under FreeBSD 7.0 including a
Seagate USB external hard drive and some random cheapo flash storage devices.  


Errors from dmesg:

umass1: <Qualcomm, Incorporated USB MMC Storage, class 0/0, rev 1.10/0.00, addr 2> on uhub3
da1 at umass-sim1 bus 1 target 0 lun 0
da1: <Qualcomm MMC Storage 2.31> Removable Direct Access SCSI-2 device
da1: 1.000MB/s transfers
da1: 947MB (1939457 512 byte sectors: 64H 32S/T 947C)
(da1:umass-sim1:1:0:0): READ(10). CDB: 28 0 0 1d 98 0 0 0 1 0
(da1:umass-sim1:1:0:0): CAM Status: SCSI Status Error
(da1:umass-sim1:1:0:0): SCSI Status: Check Condition
(da1:umass-sim1:1:0:0): NOT READY asc:3a,0
(da1:umass-sim1:1:0:0): Medium not present field replaceable unit: 20
(da1:umass-sim1:1:0:0): Unretryable error
(da1:umass-sim1:1:0:0): Invalidating pack
(da1:umass-sim1:1:0:0): SYNCHRONIZE CACHE. CDB: 35 0 0 0 0 0 0 0 0 0
(da1:umass-sim1:1:0:0): NOT READY asc:3a,0
(da1:umass-sim1:1:0:0): Medium not present field replaceable unit: 20
umass1: at uhub3 port 2 (addr 2) disconnected

(da1:umass-sim1:1:0:0): lost device
(da1:umass-sim1:1:0:0): removing device entry
umass1: detached


(root@vesper) [/usr/ports]: usbdevs -v
<snipped unrelated output>
Controller /dev/usb5:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), AcerLabs(0x0000), rev 1.00
 port 1 powered
 port 2 powered
 port 3 powered
 port 4 powered
 port 5 powered
 port 6 addr 2: high speed, self powered, config 1, product 0x0201(0x0201), vendor 0x050d(0x050d), rev 0.00
  port 4 addr 3: full speed, power 100 mA, config 1, USB MMC Storage(0x1000), Qualcomm, Incorporated(0x05c6), rev 0.00


(root@vesper) [/usr/ports]: camcontrol devlist -v
scbus0 on umass-sim0 bus 0:
<Qualcomm MMC Storage 2.31>        at scbus0 target 0 lun 0 (pass0,da0)
scbus1 on sbp0 bus 0:
<  >                               at scbus1 target -1 lun -1 ()
scbus2 on ata0 bus 0:
<SONY DVD-ROM DDU1615 GYS4>        at scbus2 target 0 lun 0 (cd0,pass1)
<  >                               at scbus2 target -1 lun -1 ()
scbus3 on ata1 bus 0:
<SONY DVD RW DW-G120A MYR5>        at scbus3 target 0 lun 0 (cd1,pass2)
<  >                               at scbus3 target -1 lun -1 ()
scbus4 on ata2 bus 0:
<  >                               at scbus4 target -1 lun -1 ()
scbus5 on ata3 bus 0:
<  >                               at scbus5 target -1 lun -1 ()
scbus6 on ata4 bus 0:
<  >                               at scbus6 target -1 lun -1 ()
scbus7 on ata5 bus 0:
<  >                               at scbus7 target -1 lun -1 ()
scbus-1 on xpt0 bus 0:
<  >                               at scbus-1 target -1 lun -1 (xpt0)


(root@vesper) [/usr/ports]: devinfo -v
<snipped unrelated output>
                    umass0 pnpinfo vendor=0x05c6 product=0x1000 devclass=0x00 devsubclass=0x00 release=0x0000 sernum="000000000002" intclass=0x08 intsubclass=0x06 at port=3 interface=0


The other referenced PR's don't contain the "field replaceable unit"
output line in their information.  Whether this is unique to my issue
or unique/new beyond 6.1, I am unsure.

How-To-Repeat: The errors posted above appear upon connection of the phone via USB to
the host system.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2008-03-27 05:44:44 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-usb

Over to maintainer(s).
Comment 2 Marcin Cieślak 2008-03-27 13:46:15 UTC
That's interesting.

I have an Option Globetrotter GTMAX 7.2 3G card that also includes a
so-called "Zero Configuration" feature that identifies as:

Mar 27 14:33:12 radziecki kernel: umass2: <Qualcomm, Incorporated USB
MMC Storage, class 0/0, rev 1.10/0.00, addr 2> on uhub7
Mar 27 14:33:12 radziecki kernel: umass2: SCSI over Bulk-Only; quirks =
0x0000
Mar 27 14:33:12 radziecki kernel: umass2:3:2:-1: Attached to scbus3
Mar 27 14:33:12 radziecki kernel: cd0 at umass-sim2 bus 2 target 0 lun 0
Mar 27 14:33:12 radziecki kernel: cd0: <GT HSDPA Modem 3.00> Removable
CD-ROM SCSI-2 device
Mar 27 14:33:12 radziecki kernel: cd0: 1.000MB/s transfers
Mar 27 14:33:12 radziecki kernel: cd0: Attempt to query device size
failed: NOT READY, Medium not present

but for me this is just a CD-ROM device, and it works. It is also
read-only.

1) This will not fix your issue but can you try umass.c and usbdevs (no
need to install ubsa.c) patches from:

http://akson.sgh.waw.pl/~saper/FreeBSD/gt/zeroconf/

I wonder what happens to your system after this :)

2) Can you compile your umass module with -DUSB_DEBUG and set

sysctl hw.usb.umass.debug=3342336

To set -DUSB_DEBUG the easiest way is to apply

Index: Makefile
===================================================================
RCS file: /usr/home/ncvs/src/sys/modules/umass/Makefile,v
retrieving revision 1.14
diff -u -r1.14 Makefile
--- Makefile    4 Jun 2005 10:58:38 -0000       1.14
+++ Makefile    19 Mar 2008 00:18:31 -0000
@@ -2,6 +2,8 @@

 .PATH: ${.CURDIR}/../../dev/usb

+DEBUG_FLAGS=-g -DUSB_DEBUG
+
 KMOD=  umass
 SRCS=  bus_if.h device_if.h \
        opt_usb.h opt_cam.h opt_scsi.h \


and then

cd /sys/modules/umass

make obj all

And "make load" as root

Provided you don't have umass in your kernel already.

-- 
              << Marcin Cieslak // saper@saper.info >>
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:44 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped