From owner-freebsd-usb@FreeBSD.ORG Sat Sep 26 07:16:09 2009 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32BF6106566C for ; Sat, 26 Sep 2009 07:16:09 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe11.swip.net [212.247.155.65]) by mx1.freebsd.org (Postfix) with ESMTP id 2ABB08FC18 for ; Sat, 26 Sep 2009 07:16:07 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=f3GbyprX-2wA:10 a=MnI1ikcADjEx7bvsp0jZvQ==:17 a=s9oXJcMGAAAA:8 a=n9D7W5_RIkdjBLTowpwA:9 a=Sb43M3VFQ6GaTgJ5qdYA:7 a=J3PU8QErd1OTnL0elY-hdEFKEr0A:4 a=f6O2YbFhSxR-Tgj0:21 a=Hi_pn8sU99XHxWJt:21 Received: from [188.126.201.140] (account mc467741@c2i.net HELO laptop.adsl.tele2.no) by mailfe11.swip.net (CommuniGate Pro SMTP 5.2.16) with ESMTPA id 1141124834; Sat, 26 Sep 2009 09:16:04 +0200 From: Hans Petter Selasky To: freebsd-usb@freebsd.org Date: Sat, 26 Sep 2009 09:16:43 +0200 User-Agent: KMail/1.11.4 (FreeBSD/9.0-CURRENT; KDE/4.2.4; i386; ; ) References: <200909252038.n8PKcEch066064@www.freebsd.org> In-Reply-To: <200909252038.n8PKcEch066064@www.freebsd.org> X-Face: (%:6u[ldzJ`0qjD7sCkfdMmD*RxpOwEEQ+KWt[{J#x6ow~JO:,zwp.(t; @Aq :4:&nFCgDb8[3oIeTb^'",;u{5{}C9>"PuY\)!=#\u9SSM-nz8+SR~B\!qBv MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909260916.45106.hselasky@c2i.net> Cc: Olivier Cochard-Labbe , freebsd-gnats-submit@freebsd.org Subject: Re: usb/139142: [regression] ehci drivers (NVIDIA nForce4 USB 2.0 controller ) not working with 8.0-RC1 X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Sep 2009 07:16:09 -0000 On Friday 25 September 2009 22:38:14 Olivier Cochard-Labbe wrote: > >Number: 139142 > >Category: usb > >Synopsis: [regression] ehci drivers (NVIDIA nForce4 USB 2.0 > > controller ) not working with 8.0-RC1 Confidential: no > >Severity: serious > >Priority: low > >Responsible: freebsd-usb > >State: open > >Quarter: > >Keywords: > >Date-Required: > >Class: sw-bug > >Submitter-Id: current-users > >Arrival-Date: Fri Sep 25 20:40:02 UTC 2009 > >Closed-Date: > >Last-Modified: > >Originator: Olivier Cochard-Labbe > >Release: 8.0 RC1 > >Organization: > > FreeNAS/BSDRP > > >Environment: > >Description: > > I meet a problem since 8.0 Beta1 to 8.0-RC1 (amd64 and i386) on an Asus > K8N4-E Deluxe motherboard: > > During the kernel load, my system hang (no dump, no error message). > The last messages are (hand copy) in verbose mode: > > ohci0: irq 21 at device 2.0 on pci0 > ohci0: Lazy allocation of 0x1000 bytes rid 0x10 type 3 at 0x80000000 > ohci0: Reserved 0x1000 bytes for rid 0x10 type 3 at 0x80000000 > ioapic0: routing intpin 21 (PCI IRQ 21) to lapic 0 vector 49 > ohci0: [MPSAFE] > ohci0: [ITHREAD] > usbus0: SMM does not respond, resetting > usbus0: reset timeout > ohci0: USB init failed > device_attach: ohci0 attach returned 6 > ehci0: irq 22 at device 2.1 on pci0 > ehci0: Lazy allocation of 0x4000 bytes rid 0x10 type 3 at 0x80000000 > ehci0: Reserved 0x4000 bytes for rid 0x10 type 3 at 0x80000000 > ioapci0: routing intpin 22 (PCI IRQ 22) to lapic 0 vector 49 > ehci0: [MPSAFE] > ehci0: [ITHREAD] > > If I disable the USB 2.0 controller in the BIOS: The system can > continue to load the kernel. > > The ehci drivers works great with FreeBSD 7.2: The file attached include > the dmesg and pciconf -lv under FreeBSD 7.2. > > Thanks, > > >How-To-Repeat: > > Using 8.0-RC1 on an Asus K8N4-E Delux motherboard > > >Fix: > > Disable USB 2.0 controller in the BIOS. > > Patch attached with submission follows: > > [olivier@dev64]~>dmesg > Copyright (c) 1992-2009 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 7.2-RELEASE-p2 #0: Wed Jun 24 00:14:35 UTC 2009 > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC > Timecounter "i8254" frequency 1193182 Hz quality 0 > CPU: AMD Athlon(tm) 64 Processor 3000+ (2010.31-MHz K8-class CPU) > Origin = "AuthenticAMD" Id = 0x20fc2 Stepping = 2 > > Features=0x78bfbff,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2> Features2=0x1 > AMD Features=0xe2500800 > AMD Features2=0x1 > usable memory = 2134417408 (2035 MB) > avail memory = 2058027008 (1962 MB) > ACPI APIC Table: > ioapic0 irqs 0-23 on motherboard > kbd1 at kbdmux0 > acpi0: on motherboard > acpi0: [ITHREAD] > acpi0: Power Button (fixed) > acpi0: reservation of 0, a0000 (3) failed > acpi0: reservation of 100000, 7fef0000 (3) failed > Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000 > acpi_timer0: <24-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0 > acpi_button0: on acpi0 > pcib0: port 0xcf8-0xcff on acpi0 > pci0: on pcib0 > pci0: at device 0.0 (no driver attached) > isab0: at device 1.0 on pci0 > isa0: on isab0 > pci0: at device 1.1 (no driver attached) > ohci0: mem 0xd3003000-0xd3003fff irq 21 at > device 2.0 on pci0 ohci0: [GIANT-LOCKED] > ohci0: [ITHREAD] > usb0: OHCI version 1.0, legacy support > usb0: SMM does not respond, resetting > usb0: on ohci0 > usb0: USB revision 1.0 > uhub0: on usb0 > uhub0: 10 ports with 10 removable, self powered > atapci0: port > 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 6.0 on pci0 > ata0: on atapci0 > ata0: [ITHREAD] > ata1: on atapci0 > ata1: [ITHREAD] > atapci1: port > 0x9f0-0x9f7,0xbf0-0xbf3,0x970-0x977,0xb70-0xb73,0xd800-0xd80f mem > 0xd3002000-0xd3002fff irq 22 at device 7.0 on pci0 atapci1: [ITHREAD] > ata2: on atapci1 > ata2: [ITHREAD] > ata3: on atapci1 > ata3: [ITHREAD] > atapci2: port > 0x9e0-0x9e7,0xbe0-0xbe3,0x960-0x967,0xb60-0xb63,0xc400-0xc40f mem > 0xd3001000-0xd3001fff irq 23 at device 8.0 on pci0 atapci2: [ITHREAD] > ata4: on atapci2 > ata4: [ITHREAD] > ata5: on atapci2 > ata5: [ITHREAD] > pcib1: at device 9.0 on pci0 > pci5: on pcib1 > nfe0: port 0xb000-0xb007 mem > 0xd3000000-0xd3000fff irq 21 at device 10.0 on pci0 miibus0: on > nfe0 > e1000phy0: PHY 15 on miibus0 > e1000phy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseTX-FDX, > auto nfe0: Ethernet address: 00:13:d4:d6:3a:7b > nfe0: [FILTER] > pcib2: at device 11.0 on pci0 > pci4: on pcib2 > pcib3: at device 12.0 on pci0 > pci3: on pcib3 > pcib4: at device 13.0 on pci0 > pci2: on pcib4 > pcib5: at device 14.0 on pci0 > pci1: on pcib5 > vgapci0: mem > 0xd0000000-0xd0ffffff,0xc0000000-0xcfffffff,0xd1000000-0xd1ffffff irq 18 at > device 0.0 on pci1 acpi_tz0: on acpi0 > sio0: configured irq 4 not in bitmap of probed irqs 0 > sio0: port may not be enabled > sio0: configured irq 4 not in bitmap of probed irqs 0 > sio0: port may not be enabled > sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on > acpi0 sio0: type 16550A > sio0: [FILTER] > cpu0: on acpi0 > acpi_throttle0: on cpu0 > powernow0: on cpu0 > orm0: at iomem 0xd0000-0xd3fff on isa0 > atkbdc0: at port 0x60,0x64 on isa0 > atkbd0: irq 1 on atkbdc0 > kbd0 at atkbd0 > atkbd0: [GIANT-LOCKED] > atkbd0: [ITHREAD] > ppc0: cannot reserve I/O port range > sc0: at flags 0x100 on isa0 > sc0: VGA <16 virtual consoles, flags=0x300> > sio1: configured irq 3 not in bitmap of probed irqs 0 > sio1: port may not be enabled > vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 > uhub1: on uhub0 > uhub1: 2 ports with 1 removable, bus powered > ukbd0: on uhub1 > kbd2 at ukbd0 > uhid0: on uhub1 > ums0: > on uhub1 ums0: 3 buttons and Z dir. > Timecounter "TSC" frequency 2010312369 Hz quality 800 > Timecounters tick every 1.000 msec > ad0: 286168MB at ata0-master UDMA100 > ad8: 953869MB at ata4-master SATA150 > GEOM: ad0: the secondary GPT table is corrupt or invalid. > GEOM: ad0: using the primary only -- recovery suggested. > GEOM_LABEL: Label for provider ad0p1 is ufsid/477f45096d16161b. > GEOM_LABEL: Label for provider ad0p1 is ufs/Disque1. > GEOM_LABEL: Label for provider ad0s1a is ufsid/4a675b954a5764b7. > GEOM_LABEL: Label for provider ad8p1 is ufsid/499c8ec590cbe4cd. > GEOM_LABEL: Label for provider ad8p1 is ufs/1TB3. > Trying to mount root from ufs:/dev/ad0s1a > GEOM_LABEL: Label ufs/Disque1 removed. > GEOM_LABEL: Label ufsid/477f45096d16161b removed. > GEOM_LABEL: Label ufsid/4a675b954a5764b7 removed. > GEOM_LABEL: Label for provider ad0s1a is ufsid/4a675b954a5764b7. > GEOM_LABEL: Label ufsid/4a675b954a5764b7 removed. > GEOM_LABEL: Label ufsid/499c8ec590cbe4cd removed. > WARNING: /mnt was not properly dismounted > kqemu version 0x00010400 > kqemu: KQEMU installed, max_locked_mem=1042196kB. > [olivier@dev64]~>pciconf -lv > none0@pci0:0:0:0: class=0x058000 card=0x815a1043 chip=0x005e10de rev=0xa3 > hdr=0x00 vendor = 'Nvidia Corp' > device = 'nForce4 Memory Controller' > class = memory > isab0@pci0:0:1:0: class=0x060100 card=0x815a1043 chip=0x005010de rev=0xa3 > hdr=0x00 vendor = 'Nvidia Corp' > device = 'nForce4 PCI to ISA Bridge' > class = bridge > subclass = PCI-ISA > none1@pci0:0:1:1: class=0x0c0500 card=0x815a1043 chip=0x005210de rev=0xa2 > hdr=0x00 vendor = 'Nvidia Corp' > device = 'nForce4 SMBus' > class = serial bus > subclass = SMBus > ohci0@pci0:0:2:0: class=0x0c0310 card=0x815a1043 chip=0x005a10de rev=0xa2 > hdr=0x00 vendor = 'Nvidia Corp' > device = 'nForce4 USB Controller' > class = serial bus > subclass = USB > atapci0@pci0:0:6:0: class=0x01018a card=0x815a1043 chip=0x005310de rev=0xf2 > hdr=0x00 vendor = 'Nvidia Corp' > device = 'NVidia nForce 4 SLI IDE Controller' > class = mass storage > subclass = ATA > atapci1@pci0:0:7:0: class=0x010185 card=0x815a1043 chip=0x005410de rev=0xf3 > hdr=0x00 vendor = 'Nvidia Corp' > device = 'NVidia nForce 4 SLI IDE Controller' > class = mass storage > subclass = ATA > atapci2@pci0:0:8:0: class=0x010185 card=0x815a1043 chip=0x005510de rev=0xf3 > hdr=0x00 vendor = 'Nvidia Corp' > device = 'NVidia nForce 4 SLI IDE Controller' > class = mass storage > subclass = ATA > pcib1@pci0:0:9:0: class=0x060401 card=0x00000000 chip=0x005c10de rev=0xa2 > hdr=0x01 vendor = 'Nvidia Corp' > device = 'nForce4 PCI Bridge' > class = bridge > subclass = PCI-PCI > nfe0@pci0:0:10:0: class=0x068000 card=0x81411043 chip=0x005710de rev=0xa3 > hdr=0x00 vendor = 'Nvidia Corp' > device = 'nForce4 Ultra NVidia Network Bus Enumerator' > class = bridge > pcib2@pci0:0:11:0: class=0x060400 card=0x00000000 chip=0x005d10de rev=0xa3 > hdr=0x01 vendor = 'Nvidia Corp' > device = 'nForce4 PCIe Bridge' > class = bridge > subclass = PCI-PCI > pcib3@pci0:0:12:0: class=0x060400 card=0x00000000 chip=0x005d10de rev=0xa3 > hdr=0x01 vendor = 'Nvidia Corp' > device = 'nForce4 PCIe Bridge' > class = bridge > subclass = PCI-PCI > pcib4@pci0:0:13:0: class=0x060400 card=0x00000000 chip=0x005d10de rev=0xa3 > hdr=0x01 vendor = 'Nvidia Corp' > device = 'nForce4 PCIe Bridge' > class = bridge > subclass = PCI-PCI > pcib5@pci0:0:14:0: class=0x060400 card=0x00000000 chip=0x005d10de rev=0xa3 > hdr=0x01 vendor = 'Nvidia Corp' > device = 'nForce4 PCIe Bridge' > class = bridge > subclass = PCI-PCI > hostb0@pci0:0:24:0: class=0x060000 card=0x00000000 chip=0x11001022 rev=0x00 > hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' > device = '(K8) Athlon 64/Opteron HyperTransport Technology > Configuration' class = bridge > subclass = HOST-PCI > hostb1@pci0:0:24:1: class=0x060000 card=0x00000000 chip=0x11011022 rev=0x00 > hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' > device = '(K8) Athlon 64/Opteron Address Map' > class = bridge > subclass = HOST-PCI > hostb2@pci0:0:24:2: class=0x060000 card=0x00000000 chip=0x11021022 rev=0x00 > hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' > device = '(K8) Athlon 64/Opteron DRAM Controller' > class = bridge > subclass = HOST-PCI > hostb3@pci0:0:24:3: class=0x060000 card=0x00000000 chip=0x11031022 rev=0x00 > hdr=0x00 vendor = 'Advanced Micro Devices (AMD)' > device = '(K8) Athlon 64/Opteron Miscellaneous Control' > class = bridge > subclass = HOST-PCI > vgapci0@pci0:1:0:0: class=0x030000 card=0x00000000 chip=0x01d310de rev=0xa1 > hdr=0x00 vendor = 'Nvidia Corp' > device = 'GeForce 7300 SE' > class = display > subclass = VGA > > >Release-Note: > >Audit-Trail: > >Unformatted: Have you tried only disabling USB Legacy support? There is another USB related thread going on: "sb600/sb700 ohci experimental patch" on -current. Have you tried any patches from there? diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c index 30592c1..fb6ba34 100644 --- a/sys/dev/usb/controller/ohci.c +++ b/sys/dev/usb/controller/ohci.c @@ -247,8 +249,8 @@ reset: OWRITE4(sc, OHCI_INTERRUPT_ENABLE, sc->sc_eintrs | OHCI_MIE); /* switch on desired functional features */ ctl = OREAD4(sc, OHCI_CONTROL); - ctl &= ~(OHCI_CBSR_MASK | OHCI_LES | OHCI_HCFS_MASK | OHCI_IR); - ctl |= OHCI_PLE | OHCI_IE | OHCI_CLE | OHCI_BLE | + ctl &= ~(OHCI_CBSR_MASK | OHCI_LES | OHCI_HCFS_MASK | OHCI_IR | OHCI_CLE | OHCI_CLF); + ctl |= OHCI_PLE | OHCI_IE | /*OHCI_CLE |*/ OHCI_BLE | OHCI_RATIO_1_4 | OHCI_HCFS_OPERATIONAL; /* And finally start it! */ OWRITE4(sc, OHCI_CONTROL, ctl); @@ -2727,8 +2729,17 @@ ohci_set_hw_power(struct usb_bus *bus) temp = OREAD4(sc, OHCI_CONTROL); temp &= ~(OHCI_PLE | OHCI_IE | OHCI_CLE | OHCI_BLE); - if (flags & USB_HW_POWER_CONTROL) + if (flags & USB_HW_POWER_CONTROL) { + struct usb_page_search buf_res; + + buf_res.physaddr = OREAD4(sc, OHCI_CONTROL_HEAD_ED); + printf("(hw power) control head <= %p\n", (void*)buf_res.physaddr); + usbd_get_page(&sc->sc_hw.ctrl_start_pc, 0, &buf_res); + printf("(hw power) control head => %p\n", (void*)buf_res.physaddr); + OWRITE4(sc, OHCI_CONTROL_HEAD_ED, buf_res.physaddr); + temp |= OHCI_CLE; + } --HPS