NetBSD Problem Report #47717

From martin@aprisoft.de  Fri Apr  5 08:18:43 2013
Return-Path: <martin@aprisoft.de>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 8166263F02F
	for <gnats-bugs@gnats.NetBSD.org>; Fri,  5 Apr 2013 08:18:43 +0000 (UTC)
Message-Id: <20130405081835.A9439ED0E4D@emmas.aprisoft.de>
Date: Fri,  5 Apr 2013 10:18:35 +0200 (CEST)
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: interrupt problem when starting an Acer Labs M5237 USB ohci controller
X-Send-Pr-Version: 3.95

>Number:         47717
>Category:       kern
>Synopsis:       interrupt problem when starting an Acer Labs M5237 USB ohci controller
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Apr 05 08:20:00 +0000 2013
>Closed-Date:    Sat Nov 28 16:15:27 +0000 2015
>Last-Modified:  Sat Nov 28 16:15:27 +0000 2015
>Originator:     Martin Husemann
>Release:        NetBSD 6.99.19
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD whoever-brings-the-night.aprisoft.de 6.99.19 NetBSD 6.99.19 (WHOEVER) #53: Tue Apr 2 14:15:55 CEST 2013 martin@emmas.aprisoft.de:/usr/src/sys/arch/sparc64/compile/WHOEVER sparc64
Architecture: sparc64
Machine: sparc64
>Description:

When booting a sun blade 2500 with usb devices (like keyboard or mouse) plugged
into the on-board usb ports, we fail to start the ohci controller and disable
the port.

When removing the devices during boot and plugin them in later, everything
works fine.

This is not a problem with firmware/handover, as it happens with serial
console as well and also for devices the firmware does not know about.

Here is the relevant dmesg sniplet:

ohci0 at pci2 dev 10 function 0: Acer Labs M5237 USB 1.1 Host Controller (rev. 0x03)
ohci0: interrupting at ivec 7a7
ohci0: OHCI version 1.0, legacy support
usb0 at ohci0: USB revision 1.0
ohci1 at pci2 dev 11 function 0: Acer Labs M5237 USB 1.1 Host Controller (rev. 0x03)
ohci1: interrupting at ivec 7a6
ohci1: OHCI version 1.0, legacy support
usb1 at ohci1: USB revision 1.0

Note that there is no companion EHCI controller (M5239) on this pci bus,
otherwise this workaround from OpenSolaris might be enough:

   1113 	/*
   1114 	 * Acer Labs Inc. M5273 EHCI controller does not send
   1115 	 * interrupts unless the Root hub ports are routed to the EHCI
   1116 	 * host controller; so route the ports now, before we test for
   1117 	 * the presence of SOFs interrupts.
   1118 	 */
   1119 	if (ehcip->ehci_vendor_id == PCI_VENDOR_ALI) {
   1120 		/* Route all Root hub ports to EHCI host controller */
   1121 		Set_OpReg(ehci_config_flag, EHCI_CONFIG_FLAG_EHCI);
   1122 	}

http://nxr.netbsd.org/xref/src-opensolaris/onnv-gate/usr/src/uts/common/io/usb/hcd/ehci/ehci_util.c#1110

Note: they talk about M5273, not M5237, but the code does not
differentiate the two. I could not find other similar workarounds that
would affect this machine.

FreeBSD 9.1 does not have this problem on this machine.

>How-To-Repeat:
See above.
>Fix:
No idea yet.

>Release-Note:

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/47717: interrupt problem when starting an Acer Labs M5237 USB ohci controller
Date: Fri, 5 Apr 2013 11:06:01 +0200

 Here is the full FreeBSD dmesg (with machine set to serial console [!])

 Martin


 Copyright (c) 1992-2012 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 9.1-RELEASE #0 r243836: Tue Dec  4 15:49:34 UTC 2012
     root@heller.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC sparc64
 real memory  = 8589934592 (8192 MB)
 avail memory = 8377769984 (7989 MB)
 cpu0: Sun Microsystems UltraSparc-IIIi Processor (1600.00 MHz CPU)
 cpu1: Sun Microsystems UltraSparc-IIIi Processor (1600.00 MHz CPU)
 FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 kbd0 at kbdmux0
 nexus0: <Open Firmware Nexus device>
 pcib0: <Sun Host-PCI bridge> mem 0x4000e600000-0x4000e60afff,0x4000e410000-0x4000e41701f,0x7ce00000000-0x7ce000000ff,0x4000e780000-0x4000e78ffff irq 1842,1840,1841,1844,1827 on nexus0
 pcib0: Tomatillo, version 4, IGN 0x1c, bus A, PCI mode, 66MHz
 pcib0: DVMA map: 0xc0000000 to 0xdfffffff 65536 entries
 pci0: <OFW PCI bus> on pcib0
 pcib1: <Sun Host-PCI bridge> mem 0x4000ef00000-0x4000ef0afff,0x4000ec10000-0x4000ec1701f,0x7c600000000-0x7c6000000ff,0x4000ef80000-0x4000ef8ffff irq 1907,1904,1905,1908,1893 on nexus0
 pcib1: Tomatillo, version 4, IGN 0x1d, bus B, PCI mode, 66MHz
 pcib1: DVMA map: 0xc0000000 to 0xdfffffff 65536 entries
 pci1: <OFW PCI bus> on pcib1
 pcib2: <Sun Host-PCI bridge> mem 0x4000f600000-0x4000f60afff,0x4000f410000-0x4000f41701f,0x7fe00000000-0x7fe000000ff,0x4000f780000-0x4000f78ffff irq 1970,1968,1969,1972,1953 on nexus0
 pcib2: Tomatillo, version 4, IGN 0x1e, bus A, PCI mode, 33MHz
 pcib2: DVMA map: 0xc0000000 to 0xdfffffff 65536 entries
 pci2: <OFW PCI bus> on pcib2
 pcib3: <OFW PCI-PCI bridge> at device 4.0 on pci2
 pci3: <OFW PCI bus> on pcib3
 pcib4: <Sun Host-PCI bridge> mem 0x4000ff00000-0x4000ff0afff,0x4000fc10000-0x4000fc1701f,0x7f600000000-0x7f6000000ff,0x4000ff80000-0x4000ff8ffff irq 2035,2032,2033,2036,2019 on nexus0
 pcib4: Tomatillo, version 4, IGN 0x1f, bus B, PCI mode, 66MHz
 pcib4: DVMA map: 0xc0000000 to 0xdfffffff 65536 entries
 pci4: <OFW PCI bus> on pcib4
 nexus0: <memory-controller> mem 0x40000000000-0x40000000007 type memory-controller (no driver attached)
 nexus0: <memory-controller> mem 0x40000800000-0x40000800007 type memory-controller (no driver attached)
 bge0: <Broadcom BCM5703 A2, ASIC rev. 0x001002> mem 0x200000-0x20ffff at device 3.0 on pci0
 bge0: CHIP ID 0x00001002; ASIC REV 0x01; CHIP REV 0x10; PCI on PCI-X 66 MHz; 64bit
 miibus0: <MII bus> on bge0
 brgphy0: <BCM5703 1000BASE-T media interface> PHY 1 on miibus0
 brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
 bge0: Ethernet address: 00:03:ba:cd:94:5e
 jbusppm0: <JBus power management> mem 0x4000e000000-0x4000e000007,0x4000e410050-0x4000e41005f on nexus0
 mpt0: <LSILogic 1030 Ultra4 Adapter> port 0x300-0x3ff mem 0x100000-0x10ffff,0x110000-0x11ffff at device 4.0 on pci1
 mpt0: soft reset failed: doorbell wedged
 mpt0: WARNING - Failed hard reset! Trying to initialize anyway.
 mpt0: MPI Version=1.2.12.0
 mpt0: Capabilities: ( RAID-1E RAID-1 SAFTE )
 mpt0: 0 Active Volumes (1 Max)
 mpt0: 0 Hidden Drive Members (6 Max)
 mpt1: <LSILogic 1030 Ultra4 Adapter> port 0x400-0x4ff mem 0x120000-0x12ffff,0x130000-0x13ffff at device 4.1 on pci1
 mpt1: MPI Version=1.2.12.0
 mpt1: Capabilities: ( RAID-1E RAID-1 SAFTE )
 mpt1: 0 Active Volumes (1 Max)
 mpt1: 0 Hidden Drive Members (6 Max)
 isab0: <PCI-ISA bridge> at device 7.0 on pci2
 pcib2: could not route pin 1 for device 7.0
 isa0: could not map ISA interrupt 1 for node 0xf00afbb0: parallel
 isa0: <ISA bus> on isab0
 pci2: <old, non-VGA display device> at device 6.0 (no driver attached)
 pcm0: <Acer Labs M5451> port 0x900-0x9ff mem 0x100000-0x100fff at device 8.0 on pci2
 pcm0: <Analog Devices AD1881A AC97 Codec>
 pcm0: [GIANT-LOCKED]
 ohci0: <AcerLabs M5237 (Aladdin-V) USB controller> mem 0x1000000-0x1000fff at device 10.0 on pci2
 usbus0 on ohci0
 ohci1: <AcerLabs M5237 (Aladdin-V) USB controller> mem 0x2000000-0x2000fff at device 11.0 on pci2
 usbus1 on ohci1
 atapci0: <AcerLabs M5229 UDMA100 controller> port 0xa00-0xa07,0xa18-0xa1b,0xa10-0xa17,0xa08-0xa0b,0xa20-0xa2f at device 13.0 on pci2
 atapci0: using PIO transfers above 137GB as workaround for 48bit DMA access bug, expect reduced performance
 ata2: <ATA channel> at channel 0 on atapci0
 ata3: <ATA channel> at channel 1 on atapci0
 ohci2: <NEC uPD 9210 USB controller> mem 0x3000000-0x3000fff at device 8.0 on pci3
 usbus2 on ohci2
 ohci3: <NEC uPD 9210 USB controller> mem 0x3002000-0x3002fff at device 8.1 on pci3
 usbus3 on ohci3
 ehci0: <NEC uPD 720100 USB 2.0 controller> mem 0x3004000-0x30040ff at device 8.2 on pci3
 usbus4: EHCI version 1.0
 usbus4 on ehci0
 fwohci0: <Texas Instruments TSB43AB23> mem 0x3006000-0x30067ff,0x3008000-0x300bfff at device 11.0 on pci3
 fwohci0: OHCI version 1.10 (ROM=1)
 fwohci0: No. of Isochronous channels is 4.
 fwohci0: EUI64 00:05:16:00:00:41:f8:4a
 fwohci0: Phy 1394a available S400, 3 ports.
 fwohci0: Link S400, max_rec 2048 bytes.
 firewire0: <IEEE1394(FireWire) bus> on fwohci0
 dcons_crom0: <dcons configuration ROM> on firewire0
 dcons_crom0: bus_addr 0xc15b4000
 fwe0: <Ethernet over FireWire> on firewire0
 if_fwe0: Fake Ethernet address: 02:05:16:41:f8:4a
 fwe0: Ethernet address: 02:05:16:41:f8:4a
 fwip0: <IP over FireWire> on firewire0
 fwip0: Firewire address: 00:05:16:00:00:41:f8:4a @ 0xfffe00000000, S400, maxrec 2048
 fwohci0: Initiate bus reset
 fwohci0: fwohci_intr_core: BUS reset
 fwohci0: fwohci_intr_core: node_id=0x00000000, SelfID Count=1, CYCLEMASTER mode
 jbusppm1: <JBus power management> mem 0x4000f000000-0x4000f000007,0x4000f410050-0x4000f41005f on nexus0
 vgapci0: <VGA-compatible display> port 0x300-0x3ff mem 0x8000000-0xfffffff,0x100000-0x10ffff at device 2.0 on pci4
 nexus0: <i2c> mem 0x4000fc64000-0x4000fc6400f type i2c (no driver attached)
 nexus0: <syscons> type unknown (no driver attached)
 rtc0: <Real-Time Clock> at port 0x70-0x71 on isa0
 uart0: <16550 or compatible> at port 0x3f8-0x3ff irq 44 on isa0
 uart0: console (9600,n,8,1)
 uart1: <16550 or compatible> at port 0x2e8-0x2ef irq 44 on isa0
 ctl: CAM Target Layer loaded
 Timecounter "tick" frequency 1600000000 Hz quality 10
 Timecounter "stick" frequency 12000000 Hz quality 10
 Event timer "tick" frequency 1600000000 Hz quality 1000
 Timecounters tick every 1.000 msec
 firewire0: 1 nodes, maxhop <= 0 cable IRM irm(0)  (me) 
 firewire0: bus manager 0 
 usbus0: 12Mbps Full Speed USB v1.0
 usbus1: 12Mbps Full Speed USB v1.0
 ugen0.1: <AcerLabs> at usbus0
 uhub0: <AcerLabs OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
 ugen1.1: <AcerLabs> at usbus1
 uhub1: <AcerLabs OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
 usbus2: 12Mbps Full Speed USB v1.0
 usbus3: 12Mbps Full Speed USB v1.0
 ugen2.1: <NEC> at usbus2
 uhub2: <NEC OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus2
 ugen3.1: <NEC> at usbus3
 uhub3: <NEC OHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
 usbus4: 480Mbps High Speed USB v2.0
 uhub0: 2 ports with 2 removable, self powered
 ugen4.1: <NEC> at usbus4
 uhub4: <NEC EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus4
 uhub1: 2 ports with 2 removable, self powered
 uhub3: 2 ports with 2 removable, self powered
 uhub2: 3 ports with 3 removable, self powered
 ugen1.2: <vendor 0x0430> at usbus1
 uhub5: <vendor 0x0430 product 0x100e, class 9/0, rev 2.00/1.04, addr 2> on usbus1
 uhub5: 4 ports with 3 removable, bus powered
 uhub4: 5 ports with 5 removable, self powered
 ugen1.3: <Microsoft> at usbus1
 ums0: <Microsoft Microsoft IntelliMouse  with IntelliEye, class 0/0, rev 1.10/1.07, addr 3> on usbus1
 ums0: 3 buttons and [XYZ] coordinates ID=0
 ugen1.4: <vendor 0x0430> at usbus1
 ukbd0: <vendor 0x0430 Sun USB Keyboard, class 0/0, rev 2.00/1.04, addr 4> on usbus1
 kbd1 at ukbd0
 cd0 at ata3 bus 0 scbus5 target 0 lun 0
 cd0: <JLMS XJ-HD166S D3S4> Removable CD-ROM SCSI-0 device 
 cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
 cd0: cd present [271982 x 2048 byte records]
 da0 at mpt0 bus 0 scbus0 target 0 lun 0
 da0: <SEAGATE ST373207LSUN72G 045A> Fixed Direct Access SCSI-3 device 
 da0: 320.000MB/s transfers (160.000MHz, offset 63, 16bit)
 da0: Command Queueing enabled
 da0: 70007MB (143374738 512 byte sectors: 255H 63S/T 8924C)
 SMP: AP CPU #1 Launched!
 (cd0:ata3:0:0:0): READ(10). CDB: 28 0 0 4 26 6d 0 0 1 0 
 (cd0:ata3:0:0:0): CAM status: SCSI Status Error
 (cd0:ata3:0:0:0): SCSI status: Check Condition
 (cd0:ata3:0:0:0): SCSI sense: MEDIUM ERROR asc:11,6 (CIRC unrecovered error)
 (cd0:ata3:0:0:0): Error 5, Unretryable error
 (cd0:ata3:0:0:0): cddone: got error 0x5 back
 GEOM: da0: adding VTOC8 information.
 Trying to mount root from cd9660:/dev/iso9660/FreeBSD_Install [ro]...
 Entropy harvesting: interrupts ethernet point_to_point kickstart.
 Starting file system checks:
 Mounting local file systems:.

State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sat, 28 Nov 2015 16:15:27 +0000
State-Changed-Why:
Turned out to be a generic interrupt routing problem with Tomatillo pci root
hubs, recently fixed by jdc@.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.