From owner-freebsd-current@FreeBSD.ORG Fri Mar 9 05:56:35 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E44DD16A404 for ; Fri, 9 Mar 2007 05:56:35 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from mh1.centtech.com (moat3.centtech.com [64.129.166.50]) by mx1.freebsd.org (Postfix) with ESMTP id B88B313C491 for ; Fri, 9 Mar 2007 05:56:35 +0000 (UTC) (envelope-from anderson@freebsd.org) Received: from [192.168.42.21] (andersonbox1.centtech.com [192.168.42.21]) by mh1.centtech.com (8.13.8/8.13.8) with ESMTP id l295uVIU064388; Thu, 8 Mar 2007 23:56:32 -0600 (CST) (envelope-from anderson@freebsd.org) Message-ID: <45F0F70E.5070805@freebsd.org> Date: Thu, 08 Mar 2007 23:56:30 -0600 From: Eric Anderson User-Agent: Thunderbird 1.5.0.9 (X11/20070204) MIME-Version: 1.0 To: Hans Petter Selasky References: <483316d70702281352o47cb729o81a2f3b604a68587@mail.gmail.com> <200703022116.36020.hselasky@c2i.net> <45F01095.701@freebsd.org> <200703081441.10395.hselasky@c2i.net> In-Reply-To: <200703081441.10395.hselasky@c2i.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV 0.88.4/2782/Thu Mar 8 21:18:57 2007 on mh1.centtech.com X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=8.0 tests=BAYES_00 autolearn=ham version=3.1.6 X-Spam-Checker-Version: SpamAssassin 3.1.6 (2006-10-03) on mh1.centtech.com Cc: freebsd-current@freebsd.org, Rick Mullis Subject: Re: current amd64 USB problems X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Mar 2007 05:56:36 -0000 On 03/08/07 07:41, Hans Petter Selasky wrote: > On Thursday 08 March 2007 14:33, Eric Anderson wrote: >> On 03/02/07 14:16, Hans Petter Selasky wrote: >>> On Thursday 01 March 2007 13:54, Eric Anderson wrote: >>>> On 02/28/07 15:52, Rick Mullis wrote: >>>>> I have a Intel DG965RY mainboard with a Duo Core 2 Processor and 4GB of >>>>> Ram and I can not get USB working for the life of me. I have been >>>>> following the maillists and searching Google for weeks now, updating >>>>> source code and rebuild world and kernel and unfortunately usb is still >>>>> not working. I keep getting "hub root problem, error=4". When I turn >>>>> the computer on the USB lights are on and as soon as the usb0 through >>>>> usb6 comes up the lights go out and the system will not work with any >>>>> usb device. The error shows up on all usb*. Is there something I am >>>>> overlooking? This computer only runs FreeBSD 7.0-current and no gui. >>>>> >>>>> Please help. >>>> Yea, I have the same problem. I spent a ton of time yesterday trying to >>>> get a Dell PowerEdge 1950 up and running, until I realized what was >>>> going on. :( >>>> >>>> >>>> This same hardware with 6.2 looks something like this: >>>> >>>> Jan 25 09:43:21 kernel: uhci0: port >>>> 0xcce0-0xccff irq 21 at device 29.0 on pci0 >>>> Jan 25 09:43:21 kernel: uhci0: [GIANT-LOCKED] >>>> Jan 25 09:43:21 kernel: usb0: on uhci0 >>>> Jan 25 09:43:21 kernel: usb0: USB revision 1.0 >>>> Jan 25 09:43:21 kernel: uhub0: Intel UHCI root hub, class 9/0, rev >>>> 1.00/1.00, addr 1 >>>> Jan 25 09:43:21 kernel: uhub0: 2 ports with 2 removable, self powered >>>> Jan 25 09:43:21 kernel: uhci1: port >>>> 0xccc0-0xccdf irq 20 at device 29.1 on pci0 >>>> Jan 25 09:43:21 kernel: uhci1: [GIANT-LOCKED] >>>> Jan 25 09:43:21 kernel: usb1: on uhci1 >>>> Jan 25 09:43:21 kernel: usb1: USB revision 1.0 >>>> Jan 25 09:43:21 kernel: uhub1: Intel UHCI root hub, class 9/0, rev >>>> 1.00/1.00, addr 1 >>>> Jan 25 09:43:21 kernel: uhub1: 2 ports with 2 removable, self powered >>>> Jan 25 09:43:21 kernel: uhci2: port >>>> 0xcca0-0xccbf irq 21 at device 29.2 on pci0 >>>> Jan 25 09:43:21 kernel: uhci2: [GIANT-LOCKED] >>>> Jan 25 09:43:21 kernel: usb2: on uhci2 >>>> Jan 25 09:43:21 kernel: usb2: USB revision 1.0 >>>> Jan 25 09:43:21 kernel: uhub2: Intel UHCI root hub, class 9/0, rev >>>> 1.00/1.00, addr 1 >>>> Jan 25 09:43:21 kernel: uhub2: 2 ports with 2 removable, self powered >>>> Jan 25 09:43:21 kernel: ehci0: mem >>>> 0xfc800000-0xfc8003ff irq 21 at device 29.7 on pci0 >>>> Jan 25 09:43:21 kernel: ehci0: [GIANT-LOCKED] >>>> Jan 25 09:43:21 kernel: usb3: EHCI version 1.0 >>>> Jan 25 09:43:21 kernel: usb3: companion controllers, 2 ports each: usb0 >>>> usb1 usb2 >>>> Jan 25 09:43:21 kernel: usb3: on >>>> ehci0 Jan 25 09:43:21 kernel: usb3: USB revision 2.0 >>>> Jan 25 09:43:21 kernel: uhub3: Intel EHCI root hub, class 9/0, rev >>>> 2.00/1.00, addr 1 >>>> Jan 25 09:43:21 kernel: uhub3: 6 ports with 6 removable, self powered >>>> Jan 25 09:43:21 kernel: uhub4: vendor 0x413c product 0xa001, class 9/0, >>>> rev 2.00/0.00, addr 2 >>>> Jan 25 09:43:21 kernel: uhub4: multiple transaction translators >>>> Jan 25 09:43:21 kernel: uhub4: 2 ports with 2 removable, self powered >>>> Jan 25 09:43:21 kernel: ukbd0: Dell DRAC5, rev 1.10/0.00, addr 3, >>>> iclass 3/1 >>>> Jan 25 09:43:21 kernel: kbd2 at ukbd0 >>>> Jan 25 09:43:21 kernel: ums0: Dell DRAC5, rev 1.10/0.00, addr 3, iclass >>>> 3/1 Jan 25 09:43:21 kernel: ums0: X report 0x0002 not supported >>>> >>>> >>>> And under CURRENT looks like this: >>>> Feb 27 08:04:47 mail1 kernel: uhci0: >>>> port 0xcce0-0xccff irq 21 at device 29.0 on pci0 >>>> Feb 27 08:04:47 mail1 kernel: uhci0: Reserved 0x20 bytes for rid 0x20 >>>> type 4 at 0xcce0 >>>> Feb 27 08:04:47 mail1 kernel: ioapic0: routing intpin 21 (PCI IRQ 21) to >>>> vector 53 >>>> Feb 27 08:04:47 mail1 kernel: uhci0: [GIANT-LOCKED] >>>> Feb 27 08:04:47 mail1 kernel: uhci0: [ITHREAD] >>>> Feb 27 08:04:47 mail1 kernel: usb0: on >>>> uhci0 Feb 27 08:04:47 mail1 kernel: usb0: USB revision 1.0 >>>> Feb 27 08:04:47 mail1 kernel: usb0: root hub problem, error=4 >>>> Feb 27 08:04:47 mail1 kernel: uhci1: >>>> port 0xccc0-0xccdf irq 20 at device 29.1 on pci0 >>>> Feb 27 08:04:47 mail1 kernel: uhci1: Reserved 0x20 bytes for rid 0x20 >>>> type 4 at 0xccc0 >>>> Feb 27 08:04:47 mail1 kernel: ioapic0: routing intpin 20 (PCI IRQ 20) to >>>> vector 54 >>>> Feb 27 08:04:47 mail1 kernel: uhci1: [GIANT-LOCKED] >>>> Feb 27 08:04:47 mail1 kernel: uhci1: [ITHREAD] >>>> Feb 27 08:04:47 mail1 kernel: usb1: on >>>> uhci1 Feb 27 08:04:47 mail1 kernel: usb1: USB revision 1.0 >>>> Feb 27 08:04:47 mail1 kernel: usb1: root hub problem, error=4 >>>> Feb 27 08:04:47 mail1 kernel: uhci2: >>>> port 0xcca0-0xccbf irq 21 at device 29.2 on pci0 >>>> Feb 27 08:04:47 mail1 kernel: uhci2: Reserved 0x20 bytes for rid 0x20 >>>> type 4 at 0xcca0 >>>> Feb 27 08:04:47 mail1 kernel: uhci2: [GIANT-LOCKED] >>>> Feb 27 08:04:47 mail1 kernel: uhci2: [ITHREAD] >>>> Feb 27 08:04:47 mail1 kernel: usb2: on >>>> uhci2 Feb 27 08:04:47 mail1 kernel: usb2: USB revision 1.0 >>>> Feb 27 08:04:47 mail1 kernel: usb2: root hub problem, error=4 >>>> Feb 27 08:04:47 mail1 kernel: ehci0: >>>> mem 0xfc800000-0xfc8003ff irq 21 at device 29.7 on pci0 >>>> Feb 27 08:04:47 mail1 kernel: ehci0: Reserved 0x400 bytes for rid 0x10 >>>> type 3 at 0xfc800000 >>>> Feb 27 08:04:47 mail1 kernel: ehci0: [GIANT-LOCKED] >>>> Feb 27 08:04:47 mail1 kernel: ehci0: [ITHREAD] >>>> Feb 27 08:04:47 mail1 kernel: usb3: EHCI version 1.0 >>>> Feb 27 08:04:47 mail1 kernel: usb3: companion controllers, 2 ports each: >>>> usb0 usb1 usb2 >>>> Feb 27 08:04:47 mail1 kernel: usb3: >>>> on ehci0 >>>> Feb 27 08:04:47 mail1 kernel: usb3: USB revision 2.0 >>>> Feb 27 08:04:47 mail1 kernel: usb3: root hub problem, error=4 >>>> >>>> FreeBSD mail1.centtech.com 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Tue Feb >>>> 27 07:26:28 UTC 2007 .../usr/obj/usr/src/sys/GENERIC amd64 >>>> >>>> i386 seems to work fine.. >>> Have you tried the new USB stack? >>> >>> http://www.turbocat.net/~hselasky/usb4bsd >>> >>> --HPS >> Breakage: >> >> -------------------------------------------------------------- >> >> >>> stage 3.2: building everything >> >> -------------------------------------------------------------- >> cd /usr/obj/usr/src/sys/GENERIC; MAKEOBJDIRPREFIX=/usr/obj >> MACHINE_ARCH=amd64 MACHINE=amd64 CPUTYPE= >> GROFF_BIN_PATH=/usr/obj/usr/src/tmp/legacy/usr/bin >> GROFF_FONT_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/groff_font >> GROFF_TMAC_PATH=/usr/obj/usr/src/tmp/legacy/usr/share/tmac >> _SHLIBDIRPREFIX=/usr/obj/usr/src/tmp INSTALL="sh >> /usr/src/tools/install.sh" >> PATH=/usr/obj/usr/src/tmp/legacy/usr/sbin:/usr/obj/usr/src/tmp/legacy/usr/b >> in:/usr/obj/usr/src/tmp/legacy/usr/games:/usr/obj/usr/src/tmp/usr/sbin:/usr/ >> obj/usr/src/tmp/usr/bin:/usr/obj/usr/src/tmp/usr/games:/sbin:/bin:/usr/sbin: >> /usr/bin /usr/obj/usr/src/make.amd64/make KERNEL=kernel all -DNO_MODULES_OBJ >> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -g -Wall >> -Wredundant-decls -Wnested-externs -Wstrict-prototypes >> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef >> -fformat-extensions -nostdinc -I- -I. -I/usr/src/sys >> -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS >> -include opt_global.h -fno-common -finline-limit=8000 --param >> inline-unit-growth=100 --param large-function-growth=1000 >> -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 >> -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float >> -fno-asynchronous-unwind-tables -ffreestanding -Werror >> /usr/src/sys/dev/usb/ehci.c >> cc -c -O2 -frename-registers -pipe -fno-strict-aliasing -std=c99 -g >> -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes >> -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef >> -fformat-extensions -nostdinc -I- -I. -I/usr/src/sys >> -I/usr/src/sys/contrib/altq -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS >> -include opt_global.h -fno-common -finline-limit=8000 --param >> inline-unit-growth=100 --param large-function-growth=1000 >> -fno-omit-frame-pointer -mcmodel=kernel -mno-red-zone -mfpmath=387 >> -mno-sse -mno-sse2 -mno-mmx -mno-3dnow -msoft-float >> -fno-asynchronous-unwind-tables -ffreestanding -Werror >> /usr/src/sys/dev/usb/ehci_pci.c >> /usr/src/sys/dev/usb/ehci_pci.c: In function `ehci_pci_attach': >> /usr/src/sys/dev/usb/ehci_pci.c:341: warning: passing arg 5 of >> `bus_setup_intr' from incompatible pointer type >> /usr/src/sys/dev/usb/ehci_pci.c:341: error: too few arguments to >> function `bus_setup_intr' >> *** Error code 1 >> >> Stop in /usr/obj/usr/src/sys/GENERIC. >> *** Error code 1 >> >> Stop in /usr/src. >> *** Error code 1 >> >> Stop in /usr/src. > > Yes, they made some changes to the bus_setup_intr API in current. Could you > try something like this, insert a NULL argument, to all bus_setup_intr() > functions you find under /sys/dev/usb/, like shown below ? > > error = bus_setup_intr(dev, sc->sc_irq_res, INTR_TYPE_TTY, > - si_intr, sc, &ih); > + NULL, si_intr, sc, &ih); > > --HPS Yes, those changes (only 3) makes it compile and install ok, and now it sees the USB devices and works correctly! So, of course I have to ask: is this planned to be merged into cvs soon? If not, a fix for -CURRENT for these systems should be put in to make it work on a lot of systems. Thanks for the work! Eric