Subject: Re: Ehci/Umass bug ?
To: Lennart Augustsson <lennart@augustsson.net>
From: Vincent <10.50@free.fr>
List: tech-kern
Date: 11/24/2004 22:23:31
Lennart,
> You could enable a little debug in ehci and check if it says
> something about the data toggle.  It's a start.
> The places where I can imagine problems is when you get
> short transfers.

Here is what I get, starting from where I mount the device :

ehci_alloc_sqtd_chain: start len=65536
ehci_alloc_sqtd_chain: start len=60416
ehci_idone: error, addr=2, endpt=0x02, status 0x8<XACTERR>
ehci_device_clear_toggle: epipe=0xc09ad380 status=0x8d00
usbd_dump_pipe: pipe=0xc09ad380
usbd_dump_iface: iface=0xc09b2e20
  device=0xc09ad500 idesc=0xc09aec89 index=0 altindex=0 priv=0x0
usbd_dump_device: dev=0xc09ad500
  bus=0xc09aa800 default_pipe=0xc09ad480
  address=2 config=1 depth=1 speed=3 self_powered=0 power=200 langid=1033
usbd_dump_endpoint: endp=0xc09b2e00
  edesc=0xc09aec92 refcnt=1
  bEndpointAddress=0x81
  (usbd_dump_pipe:)
  refcnt=1 running=0 aborting=0
  intrxfer=0x0, repeat=0, interval=-1
ehci_device_clear_toggle: epipe=0xc09ad400 status=0x80009c08
usbd_dump_pipe: pipe=0xc09ad400
usbd_dump_iface: iface=0xc09b2e20
  device=0xc09ad500 idesc=0xc09aec89 index=0 altindex=0 priv=0x0
usbd_dump_device: dev=0xc09ad500
  bus=0xc09aa800 default_pipe=0xc09ad480
  address=2 config=1 depth=1 speed=3 self_powered=0 power=200 langid=1033
usbd_dump_endpoint: endp=0xc09b2e08
  edesc=0xc09aec99 refcnt=1
  bEndpointAddress=0x02
  (usbd_dump_pipe:)
  refcnt=1 running=0 aborting=0
  intrxfer=0x0, repeat=0, interval=-1
ehci_idone: error, addr=2, endpt=0x81, status 0x50<HALTED,BABBLE>
ehci_device_clear_toggle: epipe=0xc09ad380 status=0xd8d50
usbd_dump_pipe: pipe=0xc09ad380
usbd_dump_iface: iface=0xc09b2e20
  device=0xc09ad500 idesc=0xc09aec89 index=0 altindex=0 priv=0x0
usbd_dump_device: dev=0xc09ad500
  bus=0xc09aa800 default_pipe=0xc09ad480
  address=2 config=1 depth=1 speed=3 self_powered=0 power=200 langid=1033
usbd_dump_endpoint: endp=0xc09b2e00
  edesc=0xc09aec92 refcnt=1
  bEndpointAddress=0x81
  (usbd_dump_pipe:)
  refcnt=1 running=1 aborting=0
  intrxfer=0x0, repeat=0, interval=-1
ehci_timeout: exfer=0xc09b4a00
ehci_timeout_task: xfer=0xc09b4a00
ehci_abort_xfer: xfer=0xc09b4a00 pipe=0xc09ad480
ehci_intr1: door bell
ehci_idone: aborted xfer=0xc09b4a00
umass0: BBB bulk-in stall clear failed, TIMEOUT
ehci_timeout: exfer=0xc09b4900
ehci_timeout_task: xfer=0xc09b4900
ehci_abort_xfer: xfer=0xc09b4900 pipe=0xc09ad480
ehci_intr1: door bell
ehci_idone: aborted xfer=0xc09b4900
umass0: BBB reset failed, TIMEOUT
ehci_device_clear_toggle: epipe=0xc09ad380 status=0xd8d50
usbd_dump_pipe: pipe=0xc09ad380
usbd_dump_iface: iface=0xc09b2e20
  device=0xc09ad500 idesc=0xc09aec89 index=0 altindex=0 priv=0x0
usbd_dump_device: dev=0xc09ad500
  bus=0xc09aa800 default_pipe=0xc09ad480
  address=2 config=1 depth=1 speed=3 self_powered=0 power=200 langid=1033
usbd_dump_endpoint: endp=0xc09b2e00
  edesc=0xc09aec92 refcnt=1
  bEndpointAddress=0x81
  (usbd_dump_pipe:)
  refcnt=1 running=0 aborting=0
  intrxfer=0x0, repeat=0, interval=-1


After what I rebooted.

That's what happen at boot time :

ehci after reset, status=0x00001005
ehci port 1 reset, status = 0x00001005
umass0 at uhub2 port 1 configuration 1 interface 0
umass0: Pen Drive USB DISK 2.0, rev 2.00/1.00, addr 2
umass0: using SCSI over Bulk-Only
ehci_device_clear_toggle: epipe=0xc09ad400 status=0x0
usbd_dump_pipe: pipe=0xc09ad400
usbd_dump_iface: iface=0xc09b2e20
  device=0xc09ad500 idesc=0xc09aec89 index=0 altindex=0 priv=0x0
usbd_dump_device: dev=0xc09ad500
  bus=0xc09aa800 default_pipe=0xc09ad480
  address=2 config=1 depth=1 speed=3 self_powered=0 power=200 langid=1033
usbd_dump_endpoint: endp=0xc09b2e08
  edesc=0xc09aec99 refcnt=1
  bEndpointAddress=0x02
  (usbd_dump_pipe:)
  refcnt=1 running=0 aborting=0
  intrxfer=0x0, repeat=0, interval=-1
ehci_device_clear_toggle: epipe=0xc09ad380 status=0x0
usbd_dump_pipe: pipe=0xc09ad380
usbd_dump_iface: iface=0xc09b2e20
  device=0xc09ad500 idesc=0xc09aec89 index=0 altindex=0 priv=0x0
usbd_dump_device: dev=0xc09ad500
  bus=0xc09aa800 default_pipe=0xc09ad480
  address=2 config=1 depth=1 speed=3 self_powered=0 power=200 langid=1033
usbd_dump_endpoint: endp=0xc09b2e00
  edesc=0xc09aec92 refcnt=1
  bEndpointAddress=0x81
  (usbd_dump_pipe:)
  refcnt=1 running=0 aborting=0
  intrxfer=0x0, repeat=0, interval=-1
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <, USB DISK 2.0, PMAP> disk removable
sd0: 246 MB, 984 cyl, 32 head, 16 sec, 512 bytes/sect x 503808 sectors
ehci_disown: index=3 lowspeed=1
ehci_pcd: change=0x08
---

Hope that helps you a bit to figure out something.

Vincent