Subject: kern/26990: A USB HUB does not work with ehci
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <kent@NetBSD.org>
List: netbsd-bugs
Date: 09/18/2004 17:15:21
>Number:         26990
>Category:       kern
>Synopsis:       A USB HUB does not work with ehci
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Sep 18 17:16:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     TAMURA Kent
>Release:        -current as of September 2004
>Organization:
>Environment:
NetBSD p4 2.0G NetBSD 2.0G (P4MP) #34: Sun Sep 19 01:59:13 JST 2004  kent@gabi-n.hauN.org:/sys/arch/i386/compile/P4MP i386
>Description:
A USB HDD, which has a USB HUB internally, is not recognized with
ehci as follows:

ehci_pcd: change=0x20
ehci after reset, status=0x00001005
ehci port 5 reset, status = 0x00001005
ehci_open: pipe=0xc1912500, addr=0, endpt=0 (1)
ehci_alloc_sqtd_chain: start len=8
ehci_alloc_sqtd_chain: start len=18
uhub5 at uhub4 port 5
uhub5: vendor 0x0840 product 0x0090, class 9/0, rev 2.00/0.00, addr 2
ehci_alloc_sqtd_chain: start len=9
ehci_alloc_sqtd_chain: start len=41
ehci_alloc_sqtd_chain: start len=2
ehci_alloc_sqtd_chain: start len=9
uhub5: 4 ports with 4 removable, self powered
ehci_open: pipe=0xc194bb80, addr=2, endpt=129 (1)
usbd_setup_pipe: endpoint=0x81 failed, error=INVAL
uhub5: cannot open interrupt pipe

The root cause of the error is in ehci_open():

	case UE_INTERRUPT:
		pipe->methods = &ehci_device_intr_methods;
		return (USBD_INVAL);       /* <=== Here! */

Is it unimplemented?

The USB HDD works with uhci, not ehci.
uhci_open: pipe=0xc190c400, addr=0, endpt=0 (1)
uhub4 at uhub2 port 1
uhub4: vendor 0x0840 product 0x0090, class 9/0, rev 2.00/0.00, addr 3
uhub4: 4 ports with 4 removable, self powered
uhci_open: pipe=0xc190ca80, addr=3, endpt=129 (1)
uhci_device_setintr: bw=0 offs=0
uhci_open: pipe=0xc1804700, addr=0, endpt=0 (1)
umass0 at uhub4 port 1 configuration 1 interface 0
umass0: Generic 223 USB 2.0 Card Reader, rev 2.00/1.95, addr 4
umass0: using SCSI over Bulk-Only
uhci_open: pipe=0xc18be700, addr=4, endpt=2 (1)
uhci_open: pipe=0xc190c700, addr=4, endpt=130 (1)
uhci_allocm: get 8192 TDs
scsibus0 at umass0: 2 targets, 2 luns per target
sd0 at scsibus0 target 0 lun 0: <Generic, 223 U HS-CF, 1.95> disk removable
sd0: drive offline
sd1 at scsibus0 target 0 lun 1: <Generic, 223 U HS-MS, 1.95> disk removable
sd1: drive offline
uhci_open: pipe=0xc190cb80, addr=0, endpt=0 (1)
umass1 at uhub4 port 4 configuration 1 interface 0
umass1: Prolific Technology Inc. Mass Storage Device, rev 2.00/1.00, addr 5
umass1: using SCSI over Bulk-Only
uhci_open: pipe=0xc190c880, addr=5, endpt=1 (1)
uhci_open: pipe=0xc1950f80, addr=5, endpt=130 (1)
uhci_allocm: get 8192 TDs
scsibus1 at umass1: 2 targets, 1 lun per target
sd2 at scsibus1 target 0 lun 0: <ST320082, 2A, 3.01> disk fixed
sd2: fabricating a geometry
sd2: 186 GB, 190782 cyl, 64 head, 32 sec, 512 bytes/sect x 390721969 sectors

>How-To-Repeat:
plug the device into the PC with ehci

>Fix:

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