[8-STABLE] ohci / uhub / umass - only works once.

Oliver Brandmueller ob at e-Gitt.NET
Mon May 16 15:57:48 UTC 2011


Hi,

I have a strange problem: I have a device with a card reader (and 
harddisk slot), obviously containing it's own USB hub, too. I use it as 
SD card reader.

I attach the SD card, switch the device on. hub and SD card slot show up 
in dmesg, I can use them.

After unmounting I switch of the device, umass and hub get detached 
fine.

I I switch on the device the next time it doesn't show up at all 
anymore, as if nothing happens on the USB port. On my old machine (UHCI 
instead of OHCI) everything worked like expected, the device also works 
on other operating systems/machines as expected.

Detraching and reattaching of other devices (like webcam) works just 
normal. I don't have a card reader to check with a device without own 
hub, but I think I've seen the same behaviour (doesn't work after 
detach) with a USB stick, will check that if needed.

System:

FreeBSD silver 8.2-STABLE FreeBSD 8.2-STABLE #35: Mon Apr 11 12:07:18 
CEST 2011 root at silver:/usr/obj/usr/src/sys/BLACK amd64

kldstat:

Id Refs Address            Size     Name
 1  170 0xffffffff80100000 63f738   kernel
 2    1 0xffffffff80740000 7738     ataintel.ko
 3    4 0xffffffff80748000 15da8    ata.ko
 4    4 0xffffffff8075e000 821d0    cam.ko
 5    3 0xffffffff807e1000 afb8     atapci.ko
 6    2 0xffffffff807ec000 7a00     ataahci.ko
 7    1 0xffffffff807f4000 c3f0     cd9660.ko
 8    1 0xffffffff80801000 15570    msdosfs.ko
 9    2 0xffffffff80817000 85c0     procfs.ko
10    3 0xffffffff80820000 9468     pseudofs.ko
11    1 0xffffffff8082a000 1ad7e8   zfs.ko
12    2 0xffffffff809d8000 3a10     opensolaris.ko
13    2 0xffffffff809dc000 1f818    krpc.ko
14    1 0xffffffff809fc000 7d58     geom_md.ko
15    3 0xffffffff80a04000 42c00    linux.ko
16    1 0xffffffff80a47000 e7e8     if_fxp.ko
17    3 0xffffffff80a56000 3f5f8    miibus.ko
18    1 0xffffffff80a96000 e600     if_re.ko
19    1 0xffffffff80aa5000 24d78    snd_hda.ko
20    2 0xffffffff80aca000 75588    sound.ko
21    1 0xffffffff80b40000 4480     ums.ko
22    5 0xffffffff80b45000 35778    usb.ko
23    1 0xffffffff80b7b000 8c68     umass.ko
24    1 0xffffffff80b84000 12e18    agp.ko
25    1 0xffffffff80b97000 f258     random.ko
26    1 0xffffffff80ba7000 2770     amdtemp.ko
27    1 0xffffffff80baa000 542f0    rr26xx-8.0-amd64.ko
28    1 0xffffffff80bff000 2fad0    smbfs.ko
29    3 0xffffffff80c2f000 6bc8     libiconv.ko
30    3 0xffffffff80c36000 1fc8     libmchain.ko
31    1 0xffffffff80c38000 da5458   nvidia.ko
32    1 0xffffffff819de000 6208     kbdmux.ko
33    1 0xffffffff819e5000 104b8    cpufreq.ko
34    1 0xffffffff819f6000 9fc0     ohci.ko
35    1 0xffffffff81a00000 d290     ehci.ko
36    1 0xffffffff81a0e000 5ad0     cuse4bsd.ko
37    3 0xffffffff81a14000 45ed0    vboxdrv.ko
38    1 0xffffffff81c12000 3f3f     linprocfs.ko
39    1 0xffffffff81c16000 155c     fdescfs.ko
40    2 0xffffffff81c18000 28ae     vboxnetflt.ko
41    2 0xffffffff81c1b000 8e0c     netgraph.ko
42    1 0xffffffff81c24000 151a     ng_ether.ko
43    1 0xffffffff81c26000 d0c      vboxnetadp.ko
44    1 0xffffffff81c27000 a8ea     fuse.ko

Relevant dmesg on boot:

Copyright (c) 1992-2011 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights 
reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 8.2-STABLE #35: Mon Apr 11 12:07:18 CEST 2011
    root at silver.interdotnet.de:/usr/obj/usr/src/sys/BLACK amd64
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Phenom(tm) II X4 910e Processor (2611.65-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x100f43  Family = 10  Model = 4  
Stepping = 3
  
Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x802009<SSE3,MON,CX16,POPCNT>
  AMD 
Features=0xee500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM,3DNow!+,3DNow!>
  AMD 
Features2=0x37ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,IBS,SKINIT,WDT>
  TSC: P-state invariant
real memory  = 8589934592 (8192 MB)
avail memory = 8228290560 (7847 MB)
[...]
ohci0: <OHCI (generic) USB controller> mem 0xfcffe000-0xfcffefff irq 16 
at device 18.0 on pci0
ohci0: [ITHREAD]
usbus0: <OHCI (generic) USB controller> on ohci0
ohci1: <OHCI (generic) USB controller> mem 0xfcffd000-0xfcffdfff irq 16 
at device 18.1 on pci0
ohci1: [ITHREAD]
usbus1: <OHCI (generic) USB controller> on ohci1
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xfcfff800-0xfcfff8ff irq 
17 at device 18.2 on pci0
ehci0: [ITHREAD]
usbus2: EHCI version 1.0
usbus2: <EHCI (generic) USB 2.0 controller> on ehci0
ohci2: <OHCI (generic) USB controller> mem 0xfcffc000-0xfcffcfff irq 18 
at device 19.0 on pci0
ohci2: [ITHREAD]
usbus3: <OHCI (generic) USB controller> on ohci2
ohci3: <OHCI (generic) USB controller> mem 0xfcffb000-0xfcffbfff irq 18 
at device 19.1 on pci0
ohci3: [ITHREAD]
usbus4: <OHCI (generic) USB controller> on ohci3
ehci1: <EHCI (generic) USB 2.0 controller> mem 0xfcfff400-0xfcfff4ff irq 
19 at device 19.2 on pci0
ehci1: [ITHREAD]
usbus5: EHCI version 1.0
usbus5: <EHCI (generic) USB 2.0 controller> on ehci1
[...]
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 480Mbps High Speed USB v2.0
usbus3: 12Mbps Full Speed USB v1.0
usbus4: 12Mbps Full Speed USB v1.0
usbus5: 480Mbps High Speed USB v2.0
usbus6: 12Mbps Full Speed USB v1.0
ugen0.1: <ATI> at usbus0
uhub0: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen1.1: <ATI> at usbus1
uhub1: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen2.1: <ATI> at usbus2
uhub2: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ugen3.1: <ATI> at usbus3
uhub3: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
ugen4.1: <ATI> at usbus4
uhub4: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
ugen5.1: <ATI> at usbus5
uhub5: <ATI EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus5
ugen6.1: <ATI> at usbus6
uhub6: <ATI OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus6
uhub6: 2 ports with 2 removable, self powered
uhub0: 3 ports with 3 removable, self powered
uhub1: 3 ports with 3 removable, self powered
uhub3: 3 ports with 3 removable, self powered
uhub4: 3 ports with 3 removable, self powered
[...]
uhub5: 6 ports with 6 removable, self powered
uhub2: 6 ports with 6 removable, self powered
ugen2.2: <vendor 0x0c45> at usbus2
[...]
ugen1.2: <Logitech> at usbus1
ums0: <Logitech USB-PS2 Optical Mouse, class 0/0, rev 2.00/19.00, addr 
2> on usbus1
ums0: 4 buttons and [XYZ] coordinates ID=0



dmesg when attaching the device:

ugen2.3: <vendor 0x05e3> at usbus2
uhub7: <vendor 0x05e3 USB2.0 Hub, class 9/0, rev 2.00/9.01, addr 3> on 
usbus2
uhub7: 4 ports with 4 removable, self powered
ugen2.4: <Generic> at usbus2
umass0: <Generic USB Storage, class 0/0, rev 2.00/94.51, addr 4> on 
usbus2
(probe0:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0 
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: UNIT ATTENTION asc:28,0 (Not 
ready to ready change, medium may have changed)
da0 at umass-sim0 bus 0 scbus8 target 0 lun 0
da0: <Generic STORAGE DEVICE 9451> Removable Direct Access SCSI-0 device 
da0: 40.000MB/s transfers
da0: 3886MB (7959552 512 byte sectors: 255H 63S/T 495C)
GEOM: da0: partition 1 does not start on a track boundary.
GEOM: da0: partition 1 does not end on a track boundary.
(sg1:umass-sim0:0:0:0): cam_periph_release_locked: release 
0xffffff009cdc8000 when refcount is zero
 (sg1:umass-sim0:0:0:0): cam_periph_release_locked: release 0xffffff009cdc8000 when refcount is zero

[message repeats several times until removal]


dmesg when detaching:

ugen2.3: <vendor 0x05e3> at usbus2 (disconnected)
uhub7: at uhub2, port 2, addr 3 (disconnected)
ugen2.4: <Generic> at usbus2 (disconnected)
umass0: at uhub7, port 4, addr 4 (disconnected)


When switching on the device the next time nothing shows up, also not 
visible in usbconfig.

More information on request.

Any ideas?


- Oliver


-- 
| Oliver Brandmueller          http://sysadm.in/         ob at sysadm.in |
|                        Ich bin das Internet. Sowahr ich Gott helfe. |


More information about the freebsd-stable mailing list