Subject: port-i386/34161: current GENERIC cannot use ehci on NForce4
To: None <port-i386-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Bernhard Moellemann <zza@serpens.de>
List: netbsd-bugs
Date: 08/08/2006 07:05:01
>Number:         34161
>Category:       port-i386
>Synopsis:       -current GENERIC cannot use ehci on NForce4
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 08 07:05:00 +0000 2006
>Originator:     Bernhard Moellemann
>Release:        NetBSD 3.99.24
>Organization:
>Environment:
System: NetBSD arcanic 3.99.24 NetBSD 3.99.24 (GENERIC.MPACPI) #0: Tue Aug 8 07:23:12 CEST 2006 root@arcanic:/usr/src-3.99.21/obj/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
	GENERIC with the -current sources from 2006-08-06 for i386 cannot use
	usb2 devices.
	It configures ohci0 and ehci0, but fails to attach uhub1. From dmesg:
[...]
ohci0 at pci0 dev 2 function 0: NVIDIA nForce4 USB Host Controller (rev. 0xa2)
ohci0: interrupting at irq 11
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: NVIDIA OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 8 ports with 8 removable, self powered
ehci0 at pci0 dev 2 function 1: NVIDIA nForce4 USB2 Host Controller (rev. 0xa3)
ehci0: interrupting at irq 10
ehci0: BIOS has given up ownership
ehci0: EHCI version 1.0
ehci0: companion controller, 4 ports each: ohci0
usb1 at ehci0: USB revision 2.0
uhub1 at usb1
uhub1: NVIDIA EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub1: 8 ports with 8 removable, self powered
[...]
uhidev0 at uhub0 port 1 configuration 1 interface 0
uhidev0: MOSIC SPEED-LINK Competition Pro, rev 1.10/1.00, addr 2, iclass 3/0
uhid0 at uhidev0: input=3, output=0, feature=0
[...]
uhub1: port 7, set config at addr 2 failed
uhub1: device problem, disabling port 7
[...]
	There is no usable USB2-port afterwards.

	If I disable ehci in a custom kernel, uhub1 and subsequently umass
	get attached to ohci0 and it works (slow of course).

	This happens with ACPI, too. It happended since I got this computer
	(spring).

	I did an ehci-debug kernel earlier but could not interpret the output:

NetBSD 3.99.19 (MULTIC) #2: Tue May 16 11:15:53 CEST 2006
	root@arcanic:/usr/src-3.99/sys/arch/i386/compile/MULTIC
total memory = 1023 MB
avail memory = 997 MB
BIOS32 rev. 0 found at 0xf26f0
mainbus0 (root)
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Unknown K7 (Athlon) (686-class), 2010.40 MHz, id 0x20fb1
cpu0: features 178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu0: features 178bfbff<PGE,MCA,CMOV,PAT,PSE36,MPC,MMX>
cpu0: features 178bfbff<FXSR,SSE,SSE2,HTT>
cpu0: features2 1<SSE3>
cpu0: "AMD Athlon(tm) 64 X2 Dual Core Processor 3800+"
cpu0: calibrating local timer
cpu0: apic clock running at 201 MHz
cpu1 at mainbus0: apid 1 (application processor)
cpu1: starting
cpu1: AMD Unknown K7 (Athlon) (686-class), 2010.30 MHz, id 0x20fb1
cpu1: features 178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
cpu1: features 178bfbff<PGE,MCA,CMOV,PAT,PSE36,MPC,MMX>
cpu1: features 178bfbff<FXSR,SSE,SSE2,HTT>
cpu1: features2 1<SSE3>
cpu1: "AMD Athlon(tm) 64 X2 Dual Core Processor 3800+"
ioapic0 at mainbus0 apid 2 (I/O APIC)
ioapic0: pa 0xfec00000, version 11, 24 pins
ioapic0: misconfigured as apic 0
ioapic0: remapped to apic 2
acpi0 at mainbus0: Advanced Configuration and Power Interface
acpi0: using Intel ACPI CA subsystem version 20060217
acpi0: X/RSDT: OemId <Nvidia,AWRDACPI,42302e31>, AslId <AWRD,00000000>
acpi0: SCI interrupting at int 9
acpi0: fixed-feature power button present
acpi0: fixing up intr link \_SB_.PCI0.LMCI
acpi0: fixing up intr link \_SB_.PCI0.LIDE
acpi0: fixing up intr link \_SB_.PCI0.LPCA
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
ACPI Object Type 'Processor' (0x0c) at acpi0 not configured
acpibut0 at acpi0 (PNP0C0C): ACPI Power Button
PNP0A08 [PCI Express/PCI-X Mode-2 Host Bridge] at acpi0 not configured
PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
PNP0C0F [PCI interrupt link device] at acpi0 not configured
[...]
PNP0C0F [PCI interrupt link device] at acpi0 not configured
PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
PNP0000 [AT Interrupt Controller] at acpi0 not configured
PNP0200 [AT DMA Controller] at acpi0 not configured
attimer0 at acpi0 (PNP0100): AT Timer
attimer0: io 0x40-0x43 irq 0
PNP0B00 [AT Real-Time Clock] at acpi0 not configured
pcppi0 at acpi0 (PNP0800)
pcppi0: io 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
npx0 at acpi0 (PNP0C04)
npx0: io 0xf0-0xff irq 13
npx0: using exception 16
com0 at acpi0 (PNP0501-1)
com0: io 0x3f8-0x3ff irq 4
com0: ns16550a, working fifo
lpt0 at acpi0 (PNP0400)
lpt0: io 0x378-0x37f irq 7
pckbc0 at acpi0 (PNP0F13): aux port
pckbc0: irq 12
pckbc1 at acpi0 (PNP0303): kbd port
pckbc1: io 0x60,0x64 irq 1
PNP0C02 [Plug and Play motherboard register resources] at acpi0 not configured
PNP0C01 [System Board] at acpi0 not configured
PNP0C0B [ACPI Fan] at acpi0 not configured
acpitz0 at acpi0: ACPI Thermal Zone
acpitz0: unable to get polling interval; using default of 30.0s
acpitz0: active cooling level 0: 73.0C
acpitz0: critical 75.0C passive 40.0C
pcppi0: attached to attimer0
pckbd0 at pckbc1 (kbd slot)
pckbc1: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard
pms0 at pckbc1 (aux slot)
pckbc1: using irq 12 for aux slot
wsmouse0 at pms0 mux 0
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
NVIDIA nForce4 Memory Controller (miscellaneous memory, revision 0xa3) at pci0 dev 0 function 0 not configured
NVIDIA product 0x0050 (ISA bridge, revision 0xa3) at pci0 dev 1 function 0 not configured
NVIDIA nForce4 SMBus (SMBus serial bus, revision 0xa2) at pci0 dev 1 function 1 not configured
ohci0 at pci0 dev 2 function 0: NVIDIA nForce4 USB Host Controller (rev. 0xa2)
ohci0: interrupting at ioapic0 pin 11 (irq 11)
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
uhub0 at usb0
uhub0: NVIDIA OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 8 ports with 8 removable, self powered
ehci0 at pci0 dev 2 function 1: NVIDIA nForce4 USB2 Host Controller (rev. 0xa3)
ehci0: offs=32
ehci0: interrupting at ioapic0 pin 10 (irq 10)
ehci_pci_attach: companion ohci0
ehci_dump_caps: legsup=0x01000001 legctlsts=0xe0000000
ehci0: BIOS has given up ownership
ehci_init: start
ehci0: EHCI version 1.0
ehci_init: sparams=0x101488
ehci0: companion controller, 4 ports each: ohci0
ehci_init: cparams=0xa086
ehci0: resetting
ehci0: flsize=1024
ehci_alloc_sqh: allocating chunk
ehci_alloc_sqh: allocating chunk
ehci_alloc_sqh: allocating chunk
ehci_alloc_sqh: allocating chunk
ehci_alloc_sqh: allocating chunk
ehci_alloc_sqh: allocating chunk
ehci_alloc_sqh: allocating chunk
QH(0xcb9d0e40) at 0x0202de40:
  link=0x0202de42<QH>
  endp=0x0000a000
    addr=0x00 inact=0 endpt=0 eps=2 dtc=0 hrecl=1
    mpl=0x0 ctl=0 nrl=0
  endphub=0x00000000
    smask=0x00 cmask=0x00 huba=0x00 port=0 mult=0
  curqtd=0x00000001<T>
Overlay qTD:
  next=0x00000001<T> altnext=0x00000001<T>
  status=0x00000040: toggle=0 bytes=0x0 ioc=0 c_page=0x0
    cerr=0 pid=0 stat=0x40<HALTED>
  buffer[0]=0x00000000
  buffer[1]=0x00000000
  buffer[2]=0x00000000
  buffer[3]=0x00000000
  buffer[4]=0x00000000
ehci_init: enabling
usb at ehci0 not configured
auich0 at pci0 dev 4 function 0: nForce4 AC-97 Audio
auich0: interrupting at ioapic0 pin 10 (irq 10)
auich0: ac97: Avance Logic ALC655 codec; no 3D stereo
auich0: ac97: ext id 9c4<AC97_23,LDAC,SDAC,CDAC,SPDIF>
viaide0 at pci0 dev 6 function 0
viaide0: NVIDIA nForce4 IDE Controller (rev. 0xf2)
viaide0: bus-master DMA support present
viaide0: primary channel configured to compatibility mode
viaide0: primary channel interrupting at ioapic0 pin 14 (irq 14)
[more viaide and atabus]
atabus5 at viaide2 channel 1
ppb0 at pci0 dev 9 function 0: NVIDIA nForce4 PCI Host Bridge (rev. 0xa2)
pci1 at ppb0 bus 1
pci1: i/o space, memory space enabled
fwohci0 at pci1 dev 2 function 0: VIA Technologies VT6306 IEEE 1394 Host Controller (rev. 0x80)
fwohci0: interrupting at ioapic0 pin 3 (irq 3)
fwohci0: OHCI version 1.0 (ROM=1)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:11:d8:00:00:50:12:5d
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
ieee1394if0 at fwohci0: IEEE1394 bus
fwip0 at ieee1394if0: IP over IEEE1394
fwohci0: Initiate bus reset
bktr0 at pci1 dev 3 function 0
bktr0: interrupting at ioapic0 pin 11 (irq 11)
bktr0: Hauppauge Model 37284 B421
bktr0: Detected a MSP3410D-B4 at 0x80
bktr0: Detected a DPL3418A-A2 at 0x84
bktr0: Hauppauge WinCast/TV, Philips FR1216 PAL FM tuner, msp3400c stereo, dpl3518a dolby, remote control.
radio0 at bktr0
Brooktree Bt878 Video Capture (Audio Section) (miscellaneous multimedia, revision 0x11) at pci1 dev 3 function 1 not configured
tlp0 at pci1 dev 4 function 0: DECchip 21143 Ethernet, pass 4.1
tlp0: interrupting at ioapic0 pin 3 (irq 3)
tlp0: Ethernet address 00:40:c7:97:65:a5
dmphy0 at tlp0 phy 1: DM9101 (AMD Am79C873) 10/100 media interface, rev. 2
dmphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ahc0 at pci1 dev 5 function 0: Adaptec 29160N Ultra160 SCSI adapter
ahc0: interrupting at ioapic0 pin 11 (irq 11)
ahc0: aic7892: Ultra160 Wide Channel A, SCSI Id=7, 32/253 SCBs
scsibus0 at ahc0: 16 targets, 8 luns per target
nfe0 at pci0 dev 10 function 0: ioapic0 pin 5 (irq 5), address 00:13:d4:7b:50:44
rlphy0 at nfe0 phy 1: RTL8201L 10/100 media interface, rev. 1
rlphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
ppb1 at pci0 dev 11 function 0: NVIDIA nForce4 PCIe Host Bridge (rev. 0xa3)
pci2 at ppb1 bus 2
pci2: i/o space, memory space enabled, rd/line, wr/inv ok
ppb2 at pci0 dev 12 function 0: NVIDIA nForce4 PCIe Host Bridge (rev. 0xa3)
pci3 at ppb2 bus 3
pci3: i/o space, memory space enabled, rd/line, wr/inv ok
ppb3 at pci0 dev 13 function 0: NVIDIA nForce4 PCIe Host Bridge (rev. 0xa3)
pci4 at ppb3 bus 4
pci4: i/o space, memory space enabled, rd/line, wr/inv ok
ppb4 at pci0 dev 14 function 0: NVIDIA nForce4 PCIe Host Bridge (rev. 0xa3)
pci5 at ppb4 bus 5
pci5: i/o space, memory space enabled, rd/line, wr/inv ok
vga0 at pci5 dev 0 function 0: NVIDIA product 0x0141 (rev. 0xa2)
vga0: WARNING: ignoring 64-bit BAR @ 0x14
vga0: WARNING: ignoring 64-bit BAR @ 0x1c
wsdisplay0 at vga0 kbdmux 1: console (80x25, vt100 emulation), using wskbd0
wsmux1: connecting to wsdisplay0
pchb0 at pci0 dev 24 function 0
pchb0: Advanced Micro Devices AMD64 HyperTransport configuration (rev. 0x00)
pchb1 at pci0 dev 24 function 1
pchb1: Advanced Micro Devices AMD64 Address Map configuration (rev. 0x00)
pchb2 at pci0 dev 24 function 2
pchb2: Advanced Micro Devices AMD64 DRAM configuration (rev. 0x00)
pchb3 at pci0 dev 24 function 3
pchb3: Advanced Micro Devices AMD64 Miscellaneous configuration (rev. 0x00)
isa0 at mainbus0
ioapic0: enabling
ehci_pcd_able: on=0
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
ieee1394if0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
ieee1394if0: bus manager 0 (me)
audio0 at auich0: full duplex, independent
Kernelized RAIDframe activated
atapibus0 at atabus1: 2 targets
scsibus0: waiting 2 seconds for devices to settle...
cd0 at atapibus0 drive 0: <HL-DT-STDVDRRW GWA-4164B, , 1.03> cdrom removable
cd0: 32-bit data port
cd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
cd0(viaide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA)
ehci_pcd_able: on=1
sd0 at scsibus0 target 1 lun 0: <COMPAQ, BD03685A24, HPB6> disk fixed
sd0: 34732 MB, 49855 cyl, 2 head, 713 sec, 512 bytes/sect x 71132000 sectors
sd0: sync (50.00ns offset 63), 16-bit (40.000MB/s) transfers, tagged queueing
sd1 at scsibus0 target 3 lun 0: <COMPAQ, BD03685A24, HPB6> disk fixed
sd1: 34732 MB, 49855 cyl, 2 head, 713 sec, 512 bytes/sect x 71132000 sectors
sd1: sync (50.00ns offset 63), 16-bit (40.000MB/s) transfers, tagged queueing
sd2 at scsibus0 target 4 lun 0: <SEAGATE, ST336704LSUN36G, 0326> disk fixed
sd2: 34732 MB, 24622 cyl, 27 head, 107 sec, 512 bytes/sect x 71132959 sectors
sd2: sync (50.00ns offset 63), 16-bit (40.000MB/s) transfers, tagged queueing
wd0 at atabus4 drive 0: <ST3250823AS>
wd0: drive supports 16-sector PIO transfers, LBA48 addressing
wd0: 232 GB, 484521 cyl, 16 head, 63 sec, 512 bytes/sect x 488397168 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 6 (Ultra/133)
wd0(viaide2:0:0): using PIO mode 4, Ultra-DMA mode 6 (Ultra/133) (using DMA)
raid2: RAID Level 1
raid2: Components: /dev/sd0a /dev/sd1a
raid2: Total Sectors: 70591488 (34468 MB)
raid0: RAID Level 1
raid0: Components: /dev/sd2a component1[**FAILED**]
raid0: Total Sectors: 71040896 (34687 MB)
boot device: raid2
root on raid2a dumps on raid2b
root file system type: ffs
cpu1: CPU 1 running
wsdisplay0: screen 1 added (80x25, vt100 emulation)
wsdisplay0: screen 2 added (80x25, vt100 emulation)
wsdisplay0: screen 3 added (80x25, vt100 emulation)
wsdisplay0: screen 4 added (80x25, vt100 emulation)

>How-To-Repeat:
	Boot an GENERIC.MPACPI on NForce4 with Athlon 64 X2. Try to use USB2.
>Fix:
	none known 8-( A workaround is to disable ehci in the kernel-
	configuration. Then ohci0 works, albeit slow.