From owner-freebsd-current@FreeBSD.ORG Sun Jun 15 18:20:33 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 025F337B401; Sun, 15 Jun 2003 18:20:33 -0700 (PDT) Received: from srv1.cosmo-project.de (srv1.cosmo-project.de [213.83.6.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id C98E643F3F; Sun, 15 Jun 2003 18:20:31 -0700 (PDT) (envelope-from ticso@cicely12.cicely.de) Received: from cicely5.cicely.de (cicely5.cicely.de [IPv6:3ffe:400:8d0:301:200:92ff:fe9b:20e7]) by srv1.cosmo-project.de (8.12.9/8.12.9) with ESMTP id h5G1KPhR074459 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Mon, 16 Jun 2003 03:20:28 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (cicely12.cicely.de [IPv6:3ffe:400:8d0:301::12]) by cicely5.cicely.de (8.12.9/8.12.9) with ESMTP id h5G1KN2V025088 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Jun 2003 03:20:24 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: from cicely12.cicely.de (localhost [127.0.0.1]) by cicely12.cicely.de (8.12.9/8.12.9) with ESMTP id h5G1KNVN012511; Mon, 16 Jun 2003 03:20:23 +0200 (CEST) (envelope-from ticso@cicely12.cicely.de) Received: (from ticso@localhost) by cicely12.cicely.de (8.12.9/8.12.9/Submit) id h5G1KNC2012510; Mon, 16 Jun 2003 03:20:23 +0200 (CEST) Date: Mon, 16 Jun 2003 03:20:22 +0200 From: Bernd Walter To: Bill Paul Message-ID: <20030616012022.GO10807@cicely12.cicely.de> References: <20030615225948.4E9DD37B404@hub.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030615225948.4E9DD37B404@hub.freebsd.org> X-Operating-System: FreeBSD cicely12.cicely.de 5.1-CURRENT alpha User-Agent: Mutt/1.5.4i cc: ticso@cicely9.cicely.de cc: current@FreeBSD.ORG Subject: Re: Possible EHCI bugs X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: ticso@cicely.de List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2003 01:20:33 -0000 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. After the first quick reply now with a bit rethinking... The parameter is handled with common code - no differences here. This could possibly happen with every controller. And we have a hardware problem with the OHCI controller. As it's a companion controller sharing the mechanical port this could result in problems. > ohci0: mem 0xe0000-0xe0fff irq 11 at device 15.0 on pci0 > usb0: OHCI version 1.0, legacy support > usb0: SMM does not respond, resetting Workaround code responds here - I can't say if successfully, but I've seen other negative reports with OHCI part of Acer chips. > usb0: on ohci0 > usb0: USB revision 1.0 > uhub0: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > uhub0: 2 ports with 2 removable, self powered > uhub0: device problem, disabling port 2 The connected device failed! I asume it's the axe device, which should get probed here, because the ehci controller is not active yet. USB_DEBUG should tell us more about the cause. Note: we are strictly USB1.x at this time. > ohci1: mem 0xe8002000-0xe8002fff irq 10 at device 15.1 on pci0 > usb1: OHCI version 1.0, legacy support > usb1: on ohci1 > usb1: USB revision 1.0 > uhub1: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1 > uhub1: 2 ports with 2 removable, self powered No problems reported with the second OHCI controller. > ehci0: mem 0xe8003400-0xe80034ff irq 7 at device 15.3 on pci0 > ehci_pci_attach: companion usb0 > ehci_pci_attach: companion usb1 > usb2: EHCI version 1.0 > usb2: companion controllers, 2 ports each: usb0 usb1 > usb2: on ehci0 > usb2: USB revision 2.0 > uhub2: AcerLabs EHCI root hub, class 9/0, rev 2.00/1.00, addr 1 > uhub2: 6 ports with 6 removable, self powered 6 Ports, but we have only 4 found by companion controllers! Those numbers should be identic. I'm missing PCI device 15:2! Maybe that should be a third OHCI controller with the remaning 2 ports. I'm not saying, that this is the reason for the reported problems, but I can tell you for shure that EHCI depends on working companion controllers. After this mass of problems I could also easily imagine hardwarebugs in the EHCI controller as well. We should get the hardware working first, befor we start fixing possibly symptoms in upper layers. > 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. It would be good if theres a chance to retry this test with a NEC based controller. Currently I'm not shure if it's really a software bug. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de