From nobody@FreeBSD.org  Sun Feb 11 11:13:20 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 2E23516A400
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Feb 2007 11:13:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 1A84513C467
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Feb 2007 11:13:20 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l1BBDJeS064420
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 11 Feb 2007 11:13:19 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l1BBDJsv064419;
	Sun, 11 Feb 2007 11:13:19 GMT
	(envelope-from nobody)
Message-Id: <200702111113.l1BBDJsv064419@www.freebsd.org>
Date: Sun, 11 Feb 2007 11:13:19 GMT
From: Andrew Fremantle<freebsd@skyhawk.ca>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Bizarre problem with Pioneer 111D on i965 board
X-Send-Pr-Version: www-3.0

>Number:         109044
>Category:       kern
>Synopsis:       [ata] Bizarre problem with Pioneer 111D on i965 board
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 11 11:20:06 GMT 2007
>Closed-Date:    Mon Nov 03 23:51:18 UTC 2008
>Last-Modified:  Mon Nov 03 23:51:18 UTC 2008
>Originator:     Andrew Fremantle
>Release:        6.2-RELEASE
>Organization:
>Environment:
FreeBSD  6.2-RELEASE-p1 FreeBSD 6.2-RELEASE-p1 #2: Sun Feb 11 01:04:20 PST 2007     skyhawk@:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
To start off with I'm not certain if this is FreeBSD's fault, the
controller's fault, or the drive's fault, or some combination of the
above. My only defense is "It works fine in Windows".

The setup is a dual-core Pentium 4 (Pentium D I think Intel calls them)
on an Intel DG965OT motherboard. There's a SATA harddrive and a Pioneer
DVR-111D PATA optical drive. Like most (all?) i965 chipset motherboards,
this board uses a very new Marvell controller chip to provide it's PATA
connector.

FreeBSD 6.2 does not have a driver for this controller chip. The optical
drive was not detected or usable. When I booted the install CD, sysinstall
would lock up after a few seconds. When I booted without ACPI, everything
was peachy. I put this down to a faulty GENERIC driver that wasn't working
right with the Marvell controller. This behavior was consistent with both
the i386 and amd64 install discs.

After install, I discovered I could boot with ACPI and have a usable
machine - it would just lock up when I tried to shut it down. Top showed
a consistent 40% interrupt time, and vmstat -i showed about 50,000
interrupts per whatever interval it uses on the atapci0 controller -
the unrecognized Marvell chip. Booting without ACPI gave a usable system
but an error message on the console -
Interrupt storm detected on "irq10:"; throttling interrupt source

After grabbing sys/dev/ata/ata-pci.h and ata-chipset.c from FreeBSD-CURRENT
and recompiling, FreeBSD recognized the Marvell controller. But the machine
hardlocked just prior to detecting the optical drive! Booting without ACPI
gave a working arrangement, with working optical drive, but with the same
Interrupt storm message.

I swapped the Pio-111 for another one I have lying around - same problem.
This tells me it's the make and model of the drive, not a faulty unit.
Then I swapped it for an old BenQ 52x32x52 CDRW drive and *everything
worked fine*. I plan to swap a few more drives in there and see what happens.

---
The SATA harddrive in the machine runs Windows. FreeBSD is installed on
an 80GB USB harddrive, and was installed via a USB optical drive, which
was not attached when this dmesg was taken.

Copyright (c) 1992-2007 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 6.2-RELEASE-p1 #2: Sun Feb 11 01:04:20 PST 2007
    skyhawk@:/usr/obj/usr/src/sys/GENERIC
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Pentium(R) D CPU 2.80GHz (2800.02-MHz K8-class CPU)
  Origin = "GenuineIntel"  Id = 0xf47  Stepping = 7
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x641d<SSE3,RSVD2,MON,DS_CPL,CNTX-ID,CX16,<b14>>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 2
real memory  = 1046843392 (998 MB)
avail memory = 998174720 (951 MB)
kbd1 at kbdmux0
ath_hal: 0.9.17.2 (AR5210, AR5211, AR5212, RF5111, RF5112, RF2413, RF5413)
cpu0 on motherboard
pcib0: <Host to PCI bridge> pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
pci0: <display, VGA> at device 2.0 (no driver attached)
pci0: <simple comms> at device 3.0 (no driver attached)
em0: <Intel(R) PRO/1000 Network Connection Version - 6.2.9> port 0x20c0-0x20df mem 0x50300000-0x5031ffff,0x50324000-0x50324fff irq 9 at device 25.0 on pci0
em0: Ethernet address: 00:16:76:e1:88:6e
uhci0: <UHCI (generic) USB controller> port 0x20a0-0x20bf irq 11 at device 26.0 on pci0
uhci0: [GIANT-LOCKED]
usb0: <UHCI (generic) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
uhci1: <UHCI (generic) USB controller> port 0x2080-0x209f irq 10 at device 26.1 on pci0
uhci1: [GIANT-LOCKED]
usb1: <UHCI (generic) USB controller> on uhci1
usb1: USB revision 1.0
uhub1: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub1: 2 ports with 2 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0x50325400-0x503257ff irq 11 at device 26.7 on pci0
ehci0: [GIANT-LOCKED]
usb2: EHCI version 1.0
usb2: companion controllers, 2 ports each: usb0 usb1
usb2: <EHCI (generic) USB 2.0 controller> on ehci0
usb2: USB revision 2.0
uhub2: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub2: 4 ports with 4 removable, self powered
pci0: <multimedia> at device 27.0 (no driver attached)
pcib1: <PCI-PCI bridge> at device 28.0 on pci0
pci1: <PCI bus> on pcib1
pcib2: <PCI-PCI bridge> at device 28.1 on pci0
pci2: <PCI bus> on pcib2
atapci0: <Marvell 88SX6101 UDMA133 controller> port 0x1018-0x101f,0x1024-0x1027,0x1010-0x1017,0x1020-0x1023,0x1000-0x100f mem 0x50100000-0x501001ff irq 10 at device 0.0 on pci2
ata2: <ATA channel 0> on atapci0
pcib3: <PCI-PCI bridge> at device 28.2 on pci0
pci3: <PCI bus> on pcib3
pcib4: <PCI-PCI bridge> at device 28.3 on pci0
pci4: <PCI bus> on pcib4
pcib5: <PCI-PCI bridge> at device 28.4 on pci0
pci5: <PCI bus> on pcib5
uhci2: <UHCI (generic) USB controller> port 0x2060-0x207f irq 11 at device 29.0 on pci0
uhci2: [GIANT-LOCKED]
usb3: <UHCI (generic) USB controller> on uhci2
usb3: USB revision 1.0
uhub3: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub3: 2 ports with 2 removable, self powered
uhci3: <UHCI (generic) USB controller> port 0x2040-0x205f irq 11 at device 29.1 on pci0
uhci3: [GIANT-LOCKED]
usb4: <UHCI (generic) USB controller> on uhci3
usb4: USB revision 1.0
uhub4: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub4: 2 ports with 2 removable, self powered
uhci4: <UHCI (generic) USB controller> port 0x2020-0x203f irq 11 at device 29.2 on pci0
uhci4: [GIANT-LOCKED]
usb5: <UHCI (generic) USB controller> on uhci4
usb5: USB revision 1.0
uhub5: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub5: 2 ports with 2 removable, self powered
ehci1: <EHCI (generic) USB 2.0 controller> mem 0x50325000-0x503253ff irq 11 at device 29.7 on pci0
ehci1: [GIANT-LOCKED]
usb6: EHCI version 1.0
usb6: companion controllers, 2 ports each: usb3 usb4 usb5
usb6: <EHCI (generic) USB 2.0 controller> on ehci1
usb6: USB revision 2.0
uhub6: Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1
uhub6: 6 ports with 6 removable, self powered
umass0: vendor 0x04b4 Cypress AT2LP RC42, rev 2.00/4.20, addr 2
pcib6: <PCI-PCI bridge> at device 30.0 on pci0
pci6: <PCI bus> on pcib6
fwohci0: <Texas Instruments TSB43AB22/A> mem 0x50004000-0x500047ff,0x50000000-0x50003fff irq 11 at device 3.0 on pci6
fwohci0: OHCI version 1.10 (ROM=0)
fwohci0: No. of Isochronous channels is 4.
fwohci0: EUI64 00:90:27:00:01:b7:8b:62
fwohci0: Phy 1394a available S400, 2 ports.
fwohci0: Link S400, max_rec 2048 bytes.
firewire0: <IEEE1394(FireWire) bus> on fwohci0
fwe0: <Ethernet over FireWire> on firewire0
if_fwe0: Fake Ethernet address: 02:90:27:b7:8b:62
fwe0: Ethernet address: 02:90:27:b7:8b:62
fwe0: if_start running deferred for Giant
sbp0: <SBP-2/SCSI over FireWire> on firewire0
fwohci0: Initiate bus reset
fwohci0: node_id=0xc800ffc0, gen=1, CYCLEMASTER mode
firewire0: 1 nodes, maxhop <= 0, cable IRM = 0 (me)
firewire0: bus manager 0 (me)
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci1: <Intel ICH8 SATA300 controller> port 0x2138-0x213f,0x2154-0x2157,0x2130-0x2137,0x2150-0x2153,0x2110-0x211f,0x2100-0x210f irq 11 at device 31.2 on pci0
ata3: <ATA channel 0> on atapci1
ata4: <ATA channel 1> on atapci1
pci0: <serial bus, SMBus> at device 31.3 (no driver attached)
atapci2: <Intel ICH8 SATA300 controller> port 0x2128-0x212f,0x214c-0x214f,0x2120-0x2127,0x2148-0x214b,0x20f0-0x20ff,0x20e0-0x20ef irq 11 at device 31.5 on pci0
ata5: <ATA channel 0> on atapci2
ata6: <ATA channel 1> on atapci2
orm0: <ISA Option ROM> at iomem 0xc0000-0xcafff on isa0
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model IntelliMouse Explorer, device ID 4
ppc0: cannot reserve I/O port range
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 16550A
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
RTC BIOS diagnostic error 80<clock_battery>
Timecounter "TSC" frequency 2800020622 Hz quality 800
Timecounters tick every 1.000 msec
Interrupt storm detected on "irq10:"; throttling interrupt source
acd0: DVDR <PIONEER DVD-RW DVR-111D/1.23> at ata2-master UDMA66
ad6: 152627MB <Seagate ST3160811AS 3.AAE> at ata3-master SATA150
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <ST380011 A 0000> Fixed Direct Access SCSI-0 device
da0: 40.000MB/s transfers
da0: 76319MB (156301488 512 byte sectors: 255H 63S/T 9729C)
Trying to mount root from ufs:/dev/da0s1a

>How-To-Repeat:
Attach a Pioneer 111D recorder to the PATA header on an Intel DG965OT
motherboard. I would guess this problem would apply to any i965 motherboard
using the Marvell 88SX6101 controller chip.

Actually compiling in the new driver for the controller chip changes the
situation from a 40% CPU-eating interrupt storm to a hardlock on boot just
prior to detection of the drive.
>Fix:

>Release-Note:
>Audit-Trail:

From: Andrew Fremantle <andrew@skyhawk.ca>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/109044: [ata] Bizarre problem with Pioneer 111D on i965 board
Date: Thu, 15 Feb 2007 01:54:46 -0800

 Okay, I've done a bunch of experimentation with different drives. This 
 problem seems specifically confined to the Pioneer 111D. I do have a 
 Pioneer 110D around, but I don't want to pull it right now. I'll 
 probably update with that in a day or two.
 
 I noticed the Lite-On drive reported a non-UDMA66 cable, which is 
 incorrect, and therefore ran in UDMA33 mode. I swapped the cable in 
 question and it made no difference. I also thought that perhaps the 
 Pioneer was causing problems because it's the only device on the list 
 that runs in UDMA66 mode, but I tried forcing ATAPI devices to PIO and 
 got the same result.
 
 I've got a Pioneer 110D, the previous generation in my Windows PC, and 
 it detects as UDMA4, so that is the correct speed for that drive. Just 
 to rule out high-speed devices I also tried removing the system drive 
 from it's USB enclosure and attaching it directly to the controller in 
 place of the Pioneer drive, and it worked just fine.
 
 --------
 
 AOpen CD-940E/AKU (March 1999)
 acd0: CDROM <CD-ROM 40X/AKU/U32> at ata2-slave PIO4
 
 TEAC CD-532E (July 1999)
 acd0: CDROM <CD-532E-B/1.0B> at ata2-slave PIO4
 
 BenQ 5232W (Nov 2003)
 acd0: CDRW <ATAPI CDRW 52X32/Y.DS> at ata2-master UDMA33
 
 Lite-On SHM-160P6S (Nov 2005)
 acd0: DMA limited to UDMA33, device found non-ATA66 cable
 acd0: DVDR <LITE-ON DVDRW SHW-160P6S/PS01> at ata2-slave UDMA33
 acd0: DMA limited to UDMA33, device found non-ATA66 cable
 acd0: DVDR <LITE-ON DVDRW SHW-160P6S/PS01> at ata2-master UDMA33
 
 LG GSA-4163B (Feb 2005)
 acd0: DVDR <HL-DT-ST DVDRAM GSA-4163B/A105> at ata2-master UDMA33
 
 BenQ DW1655 (Mar 2006)
 acd0: DVDR <BENQ DVD LS DW1655/BCGB> at ata2-master UDMA33
 
 Pioneer 111D (Oct 2006) (Non-ACPI) (ACPI Freezes)
 Interrupt storm detected on "irq10:"; throttling interrupt source
 acd0: DVDR <PIONEER DVD-RW DVR-111D/1.23> at ata2-master UDMA66
 Interrupt storm detected on "irq10:"; throttling interrupt source
 acd0: DVDR <PIONEER DVD-RW DVR-111D/1.23> at ata2-master PIO4
 
 ad4: 76319MB <Seagate ST380011A 8.01> at ata2-master UDMA100
 

From: Andrew Fremantle <andrew@skyhawk.ca>
To: bug-followup@FreeBSD.org
Cc: remko@FreeBSD.org
Subject: Re: kern/109044: [ata] Bizarre problem with Pioneer 111D on i965 board
Date: Sun, 18 Feb 2007 00:32:57 -0800

 As per Remko Lodder's suggestion, I just tried a fresh FreeBSD 7 
 snapshot on the machine. The February 2007 snapshot experiences the same 
 interrupt storming problem.
 
 I'm now running a fully -CURRENT kernel on that machine, and it still 
 locks up just prior to detecting the drive.
 
 - Andrew
State-Changed-From-To: open->feedback 
State-Changed-By: delphij 
State-Changed-When: Mon Nov 3 08:05:33 UTC 2008 
State-Changed-Why:  
Dear submitter, 

Could you please try if the latest -CURRENT still have this 
problem?  If not, then could you please also try if 7-STABLE 
has the problem fixed?  Sounds like a very serious issue :( 


Responsible-Changed-From-To: freebsd-bugs->delphij 
Responsible-Changed-By: delphij 
Responsible-Changed-When: Mon Nov 3 08:05:33 UTC 2008 
Responsible-Changed-Why:  
Take 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109044 
State-Changed-From-To: feedback->closed 
State-Changed-By: delphij 
State-Changed-When: Mon Nov 3 23:50:34 UTC 2008 
State-Changed-Why:  
Submitter do not have access to the hardware in question, 
so close for now.  Let's see if someone else would hit 
it... 

http://www.freebsd.org/cgi/query-pr.cgi?pr=109044 
>Unformatted:
