Subject: kern/28731: problematic umass via ehci
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <dan@uboat.geek.com.au>
List: netbsd-bugs
Date: 12/21/2004 05:12:00
>Number: 28731
>Category: kern
>Synopsis: ehci behaves oddly with some umass controllers
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 21 05:12:00 +0000 2004
>Originator: Daniel Carosone
>Release: NetBSD 2.99.11
>Organization:
very little
>Environment:
System: NetBSD uboat 2.99.11 NetBSD 2.99.11 (_uboat_) #220: Wed Dec 8 21:18:31 EST 2004 dan@uboat:/home/NetBSD/obj/p3/home/NetBSD/HEAD/src/sys/arch/i386/compile/_uboat_ i386
Architecture: i386
Machine: i386
$NetBSD: ehci.c,v 1.89 2004/12/03 08:51:31 augustss Exp $
$NetBSD: ehci_cardbus.c,v 1.10 2004/08/02 19:14:28 mycroft Exp $
$NetBSD: umass.c,v 1.116 2004/06/30 05:53:46 mycroft Exp $
$NetBSD: umass_isdata.c,v 1.13 2004/08/20 23:26:54 thorpej Exp $
$NetBSD: umass_quirks.c,v 1.67 2004/06/28 07:49:16 mycroft Exp $
$NetBSD: umass_scsipi.c,v 1.21 2004/10/28 07:07:46 yamt Exp $
>Description:
I have some slightly odd results with a cardbus ehci(4) and various
umass devices. In particular, I have one umass controller that seems
to work differently depending on what is plugged in the *other* usb
port.
First, the controller and ports:
ohci0 at cardbus1 dev 0 function 0: NEC USB Host Controller (rev. 0x43)
ohci0: interrupting at 11
ohci0: OHCI version 1.0
usb1 at ohci0: USB revision 1.0
uhub2 at usb1
uhub2: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub2: 1 port with 1 removable, self powered
ohci1 at cardbus1 dev 0 function 1: NEC USB Host Controller (rev. 0x43)
ohci1: interrupting at 11
ohci1: OHCI version 1.0
usb2 at ohci1: USB revision 1.0
uhub3 at usb2
uhub3: NEC OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 1 port with 1 removable, self powered
ehci0 at cardbus1 dev 0 function 2: NEC USB Host Controller (rev. 0x04)
ehci0: interrupting at 11
ehci0: EHCI version 1.0
ehci0: companion controllers, 1 port each: ohci0 ohci1
usb3 at ehci0: USB revision 2.0
uhub4 at usb3
uhub4: NEC EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub4: single transaction translator
uhub4: 2 ports with 2 removable, self powered
The controller works fine with a couple of usb2 umass devices I have,
a laptop-size disk enclosure, and a multi-card reader:
umass0 at uhub4 port 1 configuration 2 interface 0
umass0: In-System Design USB Storage Adapter, rev 2.00/11.05, addr 2
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <IBM-DJSA, -210, JS2O> disk fixed
sd0: fabricating a geometry
sd0: 9590 MB, 9590 cyl, 64 head, 32 sec, 512 bytes/sect x 19640880 sectors
umass1 at uhub4 port 2 configuration 1 interface 0
umass1: GENERIC Flash Reader, rev 2.00/1.19, addr 3
umass1: using SCSI over Bulk-Only
scsibus1 at umass1: 2 targets, 4 luns per target
sd1 at scsibus1 target 0 lun 0: <Generic, STORAGE DEVICE, 0119> disk removable
sd1: fabricating a geometry
sd1: 62720 KB, 61 cyl, 64 head, 32 sec, 512 bytes/sect x 125440 sectors
sd2 at scsibus1 target 0 lun 1: <Generic, STORAGE DEVICE, 0119> disk removable
sd2: drive offline
sd3 at scsibus1 target 0 lun 2: <Generic, STORAGE DEVICE, 0119> disk removable
sd3: drive offline
sd4 at scsibus1 target 0 lun 3: <Generic, STORAGE DEVICE, 0119> disk removable
sd4: drive offline
However, a third umass device, a usb-to-IDE cable, gives me odd
results.
If I plug it in by itself, I just get an endless loop of the
following, about 1 per second:
uhub4: port 2 reset failed
However, if I have the above laptop disk enclosure plugged already to
the other port, this device works fine:
umass1 at uhub4 port 2 configuration 1 interface 0
umass1: Genesys Logic USB TO IDE, rev 2.00/0.33, addr 3
umass1: using SCSI over Bulk-Only
scsibus1 at umass1: 2 targets, 1 lun per target
cd1 at scsibus1 target 0 lun 0: <LITEON, CD-ROM LTN526S, YS0A> cdrom removable
umass1 at uhub4 port 2 configuration 1 interface 0
umass1: Genesys Logic USB TO IDE, rev 2.00/0.33, addr 3
umass1: using SCSI over Bulk-Only
scsibus1 at umass1: 2 targets, 1 lun per target
sd1 at scsibus1 target 0 lun 0: <Maxtor 6, B200P0, 0811> disk fixed
sd1: fabricating a geometry
sd1: 189 GB, 194481 cyl, 64 head, 32 sec, 512 bytes/sect x 398297088 sectors
although it does seem to take a second or two to probe, unlike other devices.
Then when I unplug umass0, umass1 also detaches and I go back to the
port reset loop. (The converse happens if I swap ports for
everything, too.)
However, this only works with the laptop disk enclosure in the other
port - the card reader gadget somehow isn't 'helpful' enough in this
way.
The same umass device works fine by itself on another machine with a
different ehci:
ehci0 at pci0 dev 29 function 7: Intel 82801DB USB EHCI Controller (rev. 0x01)
and also via a usb1.1 controller.
I will gather some additional usbdebug output when I next have a
chance to use a serial console on this machine.
>How-To-Repeat:
>Fix: