Re: Possible EHCI bugs

From: Bernd Walter <ticso_at_cicely12.cicely.de>
Date: Mon, 16 Jun 2003 01:22:12 +0200
On Sun, Jun 15, 2003 at 03:59:48PM -0700, Bill Paul wrote:
> 
> I was recently contacted by an individual at Transmeta who was trying
> to use FreeBSD current with a board containing an EHCI USB controller
> and encountered some problems with it. He original intent was to use
> FreeBSD's USB 2.0 support and the if_axe driver to help debug a problem
> with said hardware combination with another OS which shall remain
> nameless. Along the way, he discovered the following:
> 
> - The USB_ATTACH() routine in if_axe.c would lead to a panic because
>   uaa->iface was NULL. I consider this a bit peculiar because a) with
>   my own test setup (my laptop, with UHCI controller), uaa->iface is
>   always populated, and b) uaa->iface is set to something during
>   the USB_PROBE() routine (it must be, otherwise the probe would fail).
>   I worked around this by grabbing the interface handle using
>   usbd_device2interface_handle(), but having the EHCI driver behave
>   inconsistently with respect to the UHCI and OHCI driver seems a
>   bit counterintuitive.
> 
> - The system panics under load. In this case, the load was induced
>   by running bonnie on an NFS filesystem mount over the axe0 interface.

USB_DEBUG with sysctl hw.usb.ehci.debug=1 during attach and shortly
befor the panic could help.
I hope it doesn't produce too much output during bonnie run.
The first case could be timing thing - some devices behave differently
on high speed than on full speed.

> Fri Jun 13 01:01:06 PDT 2003
> Jaxe0: read PHY failed
> axe0: read PHY failed
> axe0: read PHY failed
> axe0: read PHY failed

Were these over time or shortly befor the panic?

> Memory modified after free 0xc22e8310(12)
> panic: Most recently used by USB

> This seems to indicate something in the USB code is re-using a
> free()ed memory buffer. Unfortunately, I don't have this particular
> hardware available to me, and I don't know how much debugging support
> the individual at Transmeta will be able to offer. (He has his own
> problems.) Hopefully this will at least help spur some investigation.

Unfortunately there are many places where such problems could happen.
Without reviewing the complete ehci code it's difficult to get an idea
about what went wrong.

-- 
B.Walter                   BWCT                http://www.bwct.de
ticso_at_bwct.de                                  info_at_bwct.de
Received on Sun Jun 15 2003 - 14:22:24 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:12 UTC