Subject: kern/23939: Acer Labs USB 2.0 fails on EHCI, works on UHCI
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <scotte@warped.com>
List: netbsd-bugs
Date: 01/01/2004 03:14:55
>Number:         23939
>Category:       kern
>Synopsis:       Acer Labs USB 2.0 IDE->USB2 adapter doesn't work on EHCI
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 01 03:16:02 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Scott Ellis
>Release:        NetBSD 1.6ZG
>Organization:
   //////////////////////////////////////////////////////////////////////
  //    Scott Ellis     //             scotte@warped.com              //
 //////////////////////////////////////////////////////////////////////
// WARNING: This signature warps  time and space in its vicinity    //
>Environment:
	
	
System: NetBSD intrepid 1.6ZG NetBSD 1.6ZG (INTREPID.ACPI.USBDEBUG) #0: Wed Dec 31 18:53:41 PST 2003 scotte@intrepid:/usr/src/sys/arch/i386/compile/INTREPID.ACPI.USBDEBUG i386
Architecture: i386
Machine: i386
>Description:
	
Attempting to use a 320U2 IDE->USB2.0 drive enclosure fails in -current.
The system logs:

usbd_new_device: addr=2, getting full desc failed
uhub_explore: usb_new_device failed, error=TIMEOUT
uhub4: device problem, disabling port 4

Enabling umassdebug,ehcidebug,usbdebug yields:

ehci_pcd: change=0x08
ehci after reset, status=0x00001005
ehci port 3 reset, status = 0x00001005
usbd_new_device bus=0xc1653800 port=3 depth=1 speed=3
usbd_new_device: adding unit addr=2, rev=200, class=0, subclass=0, protocol=0, maxpacket=64, len=18, speed=3
ehci_timeout: exfer=0xc16bff00
ehci_timeout_task: xfer=0xc16bff00
ehci_abort_xfer: xfer=0xc16bff00 pipe=0xc1bb5a80
ehci_intr1: door bell
ehci_idone: aborted xfer=0xc16bff00
usbd_remove_device: 0xc19d7980
ehci_device_ctrl_close: pipe=0xc1bb5a80
ehci_intr1: door bell
uhub_explore: usb_new_device failed, error=TIMEOUT
uhub4: device problem, disabling port 3

The device does work on UHCI though:

usbd_new_device bus=0xc164f000 port=1 depth=1 speed=2
usbd_new_device: adding unit addr=2, rev=200, class=0, subclass=0, protocol=0, maxpacket=64, len=18, speed=2
usbd_new_device: new dev (addr 2), dev=0xc1a11180, parent=0xc1635e40
usbd_probe_and_attach: trying device specific drivers
usbd_probe_and_attach: no device specific driver found
usbd_probe_and_attach: looping over 1 configurations
usbd_set_config_index: status=0x0001, error=NORMAL_COMPLETION
usbd_set_config_index: (addr 1) cno=2 attr=0xc0, selfpowered=1, power=0
usbd_set_config_index: set config 1
umass0 at uhub0 port 1 configuration 1 interface 0
umass0: Acer Labs USB 2.0 Storage Device, rev 2.00/1.03, addr 2
umass0: using SCSI over Bulk-Only
umass0: Get Max Lun
umass0: Max Lun 0
umass0: opening iface 0xc1c364a0 epaddr 2 for BULKOUT
umass0: opening iface 0xc1c364a0 epaddr 129 for BULKIN
uhci_allocm: get 8192 TDs
umass0: umass_attach_bus: SCSI
scsibus0 at umass0: 2 targets, 1 lun per target
umass0: Attach finished
umass0: umass_scsi_cmd: at 1072926421.555631: 0:0 xs=0xc16c0000 cmd=0x12 datalen=36 (quirks=0x8000, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=6 datalen=36
umass0: umass_bbb_transfer cmd=0x12
umass0: CBW 44: cmdlen=6 (0x12000000240000000000), data = 36 bytes, dir = in
umass0: start xfer buffer=0xc1a0b468 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc15fc200, NORMAL_COMPLETION
umass0: start xfer buffer=0xcbd19000 buflen=36 flags=0x5 timeout=15000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc1c60700, NORMAL_COMPLETION
umass0: BBB_DATA actlen=36
umass0: 0x 005a00211f00000055534220322e3020 buffer=0xcd8ebe84, buflen=36
umass0: 0x 53746f72616765204465766963652020
umass0: 0x 30313030
umass0: start xfer buffer=0xc1a0b487 buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc1b78900, NORMAL_COMPLETION
umass0: CSW 44: sig = 0x53425355 (valid), tag = 44, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1072926421.654429, delta=98798: xs=0xc16c0000 residue=0 status=0
umass_scsipi_cb: at 1072926421.654429: return xs->error=0, xs->xs_status=0x0 xs->resid=0
scsibus0 target 0 lun 0: <USB 2.0, Storage Device, 0100> disk fixed not configured

I verified that EHCI is working, because another IDE->USB2 adapter works:

ehci_pcd: change=0x02
ehci after reset, status=0x00001005
ehci port 1 reset, status = 0x00001005
usbd_new_device bus=0xc1653800 port=1 depth=1 speed=3
usbd_new_device: adding unit addr=2, rev=200, class=0, subclass=0, protocol=0, maxpacket=64, len=18, speed=3
usbd_new_device: new dev (addr 2), dev=0xc1bb5080, parent=0xc1655d40
usbd_probe_and_attach: trying device specific drivers
usbd_probe_and_attach: no device specific driver found
usbd_probe_and_attach: looping over 1 configurations
usbd_set_config_index: status=0x0001, error=NORMAL_COMPLETION
usbd_set_config_index: (addr 2) cno=2 attr=0xc0, selfpowered=1, power=98
usbd_set_config_index: set config 2
umass0 at uhub4 port 1 configuration 2 interface 0
umass0: DMI USB 2.0 Storage Adaptor, rev 2.00/11.10, addr 2
umass0: using SCSI over Bulk-Only
umass0: Get Max Lun
umass0: Max Lun 0
umass0: opening iface 0xc1c36020 epaddr 1 for BULKOUT
ehci_device_clear_toggle: epipe=0xc1b6fa00 status=0x0
usbd_dump_pipe: pipe=0xc1b6fa00
usbd_dump_iface: iface=0xc1c36020
 device=0xc1bb5080 idesc=0xc1a3ec09 index=0 altindex=0 priv=0x0
usbd_dump_device: dev=0xc1bb5080
 bus=0xc1653800 default_pipe=0xc1bb5880
 address=2 config=2 depth=1 speed=3 self_powered=1 power=98 langid=1033
usbd_dump_endpoint: endp=0xc1640f40
 edesc=0xc1a3ec12 refcnt=1
 bEndpointAddress=0x01
 (usbd_dump_pipe:)
 refcnt=1 running=0 aborting=0
 intrxfer=0x0, repeat=0, interval=-1
umass0: opening iface 0xc1c36020 epaddr 130 for BULKIN
ehci_device_clear_toggle: epipe=0xc1bb5d00 status=0x0
usbd_dump_pipe: pipe=0xc1bb5d00
usbd_dump_iface: iface=0xc1c36020
 device=0xc1bb5080 idesc=0xc1a3ec09 index=0 altindex=0 priv=0x0
usbd_dump_device: dev=0xc1bb5080
 bus=0xc1653800 default_pipe=0xc1bb5880
 address=2 config=2 depth=1 speed=3 self_powered=1 power=98 langid=1033
usbd_dump_endpoint: endp=0xc1640f48
 edesc=0xc1a3ec19 refcnt=1
 bEndpointAddress=0x82
 (usbd_dump_pipe:)
 refcnt=1 running=0 aborting=0
 intrxfer=0x0, repeat=0, interval=-1
umass0: umass_attach_bus: SCSI
scsibus0 at umass0: 2 targets, 1 lun per target
umass0: Attach finished
umass0: umass_scsi_cmd: at 1072926124.720593: 0:0 xs=0xc16c0000 cmd=0x12 datalen=36 (quirks=0x8000, poll=0)
umass_scsi_cmd: async dir=1, cmdlen=6 datalen=36
umass0: umass_bbb_transfer cmd=0x12
umass0: CBW 43: cmdlen=6 (0x12000000240000000000), data = 36 bytes, dir = in
umass0: start xfer buffer=0xc19d3068 buflen=31 flags=0x0 timeout=15000
umass0: Handling BBB state 1 (BBB CBW), xfer=0xc16bff00, NORMAL_COMPLETION
umass0: start xfer buffer=0xcbd19000 buflen=36 flags=0x5 timeout=15000
umass0: Handling BBB state 2 (BBB Data), xfer=0xc1651000, NORMAL_COMPLETION
umass0: BBB_DATA actlen=36
umass0: 0x 000000011f0000005744432057443430 buffer=0xcd8ebe84, buflen=36
umass0: 0x 3042422d303044454130202020202020
umass0: 0x 30352e30
umass0: start xfer buffer=0xc19d3087 buflen=13 flags=0x0 timeout=15000
umass0: Handling BBB state 4 (BBB CSW, 1st attempt), xfer=0xc1651200, NORMAL_COMPLETION
umass0: CSW 43: sig = 0x53425355 (valid), tag = 43, res = 0, status = 0x00 (good)
umass_scsipi_cb: at 1072926124.814806, delta=94213: xs=0xc16c0000 residue=0 status=0
umass_scsipi_cb: at 1072926124.814806: return xs->error=0, xs->xs_status=0x0 xs->resid=0
scsibus0 target 0 lun 0: <WDC WD40, 0BB-00DEA0, 05.0> disk fixed not configured

>How-To-Repeat:
	
Plug 320U2 device into EHCI controller on -current!

>Fix:
	
Not known
>Release-Note:
>Audit-Trail:
>Unformatted: