From nobody@FreeBSD.org  Sat Sep 26 15:37:11 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 00E4D1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Sep 2009 15:37:11 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id E28188FC25
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Sep 2009 15:37:10 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n8QFbAhw077856
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 26 Sep 2009 15:37:10 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n8QFbAqT077855;
	Sat, 26 Sep 2009 15:37:10 GMT
	(envelope-from nobody)
Message-Id: <200909261537.n8QFbAqT077855@www.freebsd.org>
Date: Sat, 26 Sep 2009 15:37:10 GMT
From: Lee Packham <lpackham@leenux.org.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: MCP55 SATA Disks fail to initialise, leading to failure to boot
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         139156
>Category:       amd64
>Synopsis:       [ata] MCP55 SATA Disks fail to initialise, leading to failure to boot [regression]
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-amd64
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Sep 26 15:40:01 UTC 2009
>Closed-Date:    Thu Oct 29 11:55:13 UTC 2009
>Last-Modified:  Thu Oct 29 12:00:16 UTC 2009
>Originator:     Lee Packham
>Release:        8.0 RC1
>Organization:
None
>Environment:
FreeBSD smegpro.localdomain 7.2-RELEASE-p2 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  amd64

>Description:
re: the environment - I can't get the 8.0 one as I can't make it boot!

I have attached the dmesg from 7.2-RELEASE-p2 to this bug report. In short I cannot boot 8.0 RC1 as I get constant DMA TIMEOUT errors from initialising a hard disk. The same machine works absolutely find on 7.2-RELEASE-p2 so it's not hardware. I can plug any disk in and get the same problem.

I have marked this critical/high as if I were to freebsd-update to 8.0 right now, I would have a non-working server - combined with the imminent release of 8.0, it is therefore quite serious. 

>How-To-Repeat:
Connect disk to controller, boot.
>Fix:
None that I know of.

Patch attached with submission follows:

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: Dual-Core AMD Opteron(tm) Processor 1214 (2200.01-MHz K8-class CPU)
  Origin = "AuthenticAMD"  Id = 0x40f33  Stepping = 3
  Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
  Features2=0x2001<SSE3,CX16>
  AMD Features=0xea500800<SYSCALL,NX,MMX+,FFXSR,RDTSCP,LM,3DNow!+,3DNow!>
  AMD Features2=0x1f<LAHF,CMP,SVM,ExtAPIC,CR8>
  Cores per package: 2
usable memory = 4281417728 (4083 MB)
avail memory  = 4110589952 (3920 MB)
ACPI APIC Table: <HP     ProLiant>
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0 <Version 1.1> irqs 0-23 on motherboard
kbd1 at kbdmux0
acpi0: <HP ProLiant> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of fec00000, 1000 (3) failed
acpi0: reservation of fee00000, 1000 (3) failed
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x2008-0x200b on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 25000000 Hz quality 900
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pci0: <memory, RAM> at device 0.0 (no driver attached)
isab0: <PCI-ISA bridge> port 0x2f00-0x2f7f at device 1.0 on pci0
isa0: <ISA bus> on isab0
pci0: <serial bus, SMBus> at device 1.1 (no driver attached)
ohci0: <OHCI (generic) USB controller> mem 0xfcfbf000-0xfcfbffff irq 22 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: <OHCI (generic) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: <nVidia OHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 10 ports with 10 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xfcfbec00-0xfcfbecff irq 23 at device 2.1 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb1: EHCI version 1.0
usb1: companion controller, 10 ports each: usb0
usb1: <EHCI (generic) USB 2.0 controller> on ehci0
usb1: USB revision 2.0
uhub1: <nVidia EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb1
uhub1: 10 ports with 10 removable, self powered
atapci0: <nVidia nForce MCP55 SATA300 controller> port 0xed80-0xed87,0xed00-0xed03,0xec00-0xec07,0xeb80-0xeb83,0xeb00-0xeb0f mem 0xfcfbd000-0xfcfbdfff irq 21 at device 5.0 on pci0
atapci0: [ITHREAD]
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci0
ata3: [ITHREAD]
atapci1: <nVidia nForce MCP55 SATA300 controller> port 0xea80-0xea87,0xea00-0xea03,0xe980-0xe987,0xe900-0xe903,0xe880-0xe88f mem 0xfcfbc000-0xfcfbcfff irq 22 at device 5.1 on pci0
atapci1: [ITHREAD]
ata4: <ATA channel 0> on atapci1
ata4: [ITHREAD]
ata5: <ATA channel 1> on atapci1
ata5: [ITHREAD]
atapci2: <nVidia nForce MCP55 SATA300 controller> port 0xe800-0xe807,0xe780-0xe783,0xe700-0xe707,0xe680-0xe683,0xe600-0xe60f mem 0xfcfbb000-0xfcfbbfff irq 23 at device 5.2 on pci0
atapci2: [ITHREAD]
ata6: <ATA channel 0> on atapci2
ata6: [ITHREAD]
ata7: <ATA channel 1> on atapci2
ata7: [ITHREAD]
pcib1: <ACPI PCI-PCI bridge> at device 6.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 10.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <PCI-PCI bridge> at device 11.0 on pci0
pci3: <PCI bus> on pcib3
pcib4: <ACPI PCI-PCI bridge> at device 12.0 on pci0
pci4: <ACPI PCI bus> on pcib4
pcib5: <ACPI PCI-PCI bridge> at device 13.0 on pci0
pci16: <ACPI PCI bus> on pcib5
vgapci0: <VGA-compatible display> mem 0xfb000000-0xfbffffff,0xfdefc000-0xfdefffff,0xfd000000-0xfd7fffff irq 16 at device 0.0 on pci16
pcib6: <ACPI PCI-PCI bridge> at device 14.0 on pci0
pci17: <ACPI PCI bus> on pcib6
bge0: <HP NC105i PCIe Gigabit Server Adapter, ASIC rev. 0xa200> mem 0xfdff0000-0xfdffffff irq 17 at device 0.0 on pci17
miibus0: <MII bus> on bge0
brgphy0: <BCM5722 10/100/1000baseTX PHY> PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-FDX, auto
bge0: Ethernet address: 00:1f:29:e7:40:e2
bge0: [ITHREAD]
pcib7: <ACPI PCI-PCI bridge> at device 15.0 on pci0
pci18: <ACPI PCI bus> on pcib7
acpi_button0: <Power Button> on acpi0
cpu0: <ACPI CPU> on acpi0
powernow0: <PowerNow! K8> on cpu0
cpu1: <ACPI CPU> on acpi0
powernow1: <PowerNow! K8> on cpu1
orm0: <ISA Option ROM> at iomem 0xc0000-0xc7fff 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]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model GlidePoint, device ID 0
ppc0: cannot reserve I/O port range
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
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 at port 0x3f8-0x3ff irq 4 flags 0x10 on isa0
sio0: type 8250 or not responding
sio0: [FILTER]
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
ukbd0: <ServerEngines SE USB Device, class 0/0, rev 1.10/0.01, addr 2> on uhub0
kbd2 at ukbd0
ums0: <ServerEngines SE USB Device, class 0/0, rev 1.10/0.01, addr 2> on uhub0
ums0: 8 buttons and Z dir.
Timecounters tick every 1.000 msec
acd0: DVDR <HL-DT-ST DVD-RAM GH15L/FA01> at ata2-master SATA150
ad6: 715404MB <SAMSUNG HD753LJ 1AA01109> at ata3-master SATA300
ad8: 953869MB <Seagate ST31000333AS LC15> at ata4-master SATA300
ad10: 715404MB <SAMSUNG HD753LJ 1AA01109> at ata5-master SATA300
ad12: 152627MB <GB0160CAABV HPG1> at ata6-master SATA150
GEOM_LABEL: Label for provider ad8s1 is ufsid/49fefbe0b2b469d6.
SMP: AP CPU #1 Launched!
GEOM_MIRROR: Device mirror/gm6 launched (2/2).
GEOM_LABEL: Label for provider mirror/gm6s1 is ufsid/49839adec8f111d3.
GEOM_LABEL: Label for provider ad12s1a is ufsid/4983926e40323fc9.
GEOM_LABEL: Label for provider ad12s1d is ufsid/49839279a4a891da.
GEOM_LABEL: Label for provider ad12s1e is ufsid/4983926edd9d878a.
GEOM_LABEL: Label for provider ad12s1f is ufsid/4983926e451f3b4c.
Trying to mount root from ufs:/dev/ad12s1a
GEOM_LABEL: Label ufsid/4983926e40323fc9 removed.
GEOM_LABEL: Label for provider ad12s1a is ufsid/4983926e40323fc9.
GEOM_LABEL: Label ufsid/49839adec8f111d3 removed.
GEOM_LABEL: Label ufs
d/
4983926edd9d878a removed.
GEOM_LABEL: Label for provider mirror/gm6s1 is ufsid/49839adec8f111d3.
GEOM_LABEL: Label for provider ad12s1e is ufsid/4983926edd9d878a.
GEOM_LABEL: Label ufsid/49fefbe0b2b469d6 removed.
GEOM_LABEL: Label for provider ad8s1 is ufsid/49fefbe0b2b469d6.
GEOM_LABEL: Label ufsid/4983926e451f3b4c removed.
GEOM_LABEL: Label for provider ad12s1f is ufsid/4983926e451f3b4c.
GEOM_LABEL: Label ufsid/49839279a4a891da removed.
GEOM_LABEL: Label for provider ad12s1d is ufsid/49839279a4a891da.
GEOM_LABEL: Label ufsid/4983926e40323fc9 removed.
GEOM_LABEL: Label ufsid/4983926edd9d878a removed.
GEOM_LABEL: Label ufsid/4983926e451f3b4c removed.
GEOM_LABEL: Label ufsid/49839279a4a891da removed.
GEOM_LABEL: Label ufsid/49839adec8f111d3 removed.
GEOM_LABEL: Label ufsid/49fefbe0b2b469d6 removed.
This module (opensolaris) contains code covered by the
Common Development and Distribution License (CDDL)
see http://opensolaris.org/os/licensing/opensolaris_license/
WARNING: ZFS is considered to be an experimental feature in FreeBSD.
ZFS filesystem version 6
ZFS storage pool version 6
fuse4bsd: version 0.3.9-pre1, FUSE ABI 7.8
[lpackham@smegpro ~]$ uname -a
FreeBSD smegpro.localdomain 7.2-RELEASE-p2 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  amd64
[lpackham@smegpro ~]$ 


>Release-Note:
>Audit-Trail:

From: Lee Packham <lpackham@leenux.org.uk>
To: bug-followup@FreeBSD.org,
 lpackham@leenux.org.uk
Cc:  
Subject: Re: amd64/139156: [ata] MCP55 SATA Disks fail to initialise, leading to failure to boot [regression]
Date: Sun, 27 Sep 2009 10:06:06 +0100

 I just want to add that I appear to have replicated the dmesg errors  
 on 7.2 when hot swapping this disk:
 
 Sep 27 09:57:40 smegbsd kernel:
 Sep 27 09:57:44 smegbsd kernel: ad10: WARNING - SETFEATURES SET  
 TRANSFER MODE taskqueue timeout - completing request directly
 Sep 27 09:57:44 smegbsd kernel: unknown: WARNING - ATA_IDENTIFY  
 freeing taskqueue zombie request
 Sep 27 09:57:48 smegbsd kernel: ad10: WARNING - SETFEATURES SET  
 TRANSFER MODE taskqueue timeout - completing request directly
 Sep 27 09:57:48 smegbsd kernel: ad10: WARNING - SETFEATURES SET  
 TRANSFER MODE freeing taskqueue zombie request
 Sep 27 09:57:52 smegbsd kernel: ad10: WARNING - SETFEATURES ENABLE  
 RCACHE taskqueue timeout - completing request directly
 Sep 27 09:57:52 smegbsd kernel: ad10: WARNING - SETFEATURES SET  
 TRANSFER MODE freeing taskqueue zombie request
 Sep 27 09:57:56 smegbsd kernel: ad10: WARNING - SETFEATURES ENABLE  
 WCACHE taskqueue timeout - completing request directly
 Sep 27 09:57:56 smegbsd kernel: ad10: WARNING - SETFEATURES ENABLE  
 RCACHE freeing taskqueue zombie request
 Sep 27 09:58:00 smegbsd kernel: ad10: WARNING - SET_MULTI taskqueue  
 timeout - completing request directly
 Sep 27 09:58:00 smegbsd kernel: ad10: 152627MB <GB0160CAABV HPG1> at  
 ata5-master SATA150
 Sep 27 09:58:00 smegbsd kernel: ad10: WARNING - SETFEATURES ENABLE  
 WCACHE freeing taskqueue zombie request
 Sep 27 09:58:00 smegbsd kernel: ad10: WARNING - SET_MULTI freeing  
 taskqueue zombie request
 
 The disk works fine when in the machine from startup on 7.2 - but not  
 if hot swapped in. Could it be that the 8.0 kernel is behaving like  
 the disk is hot swapped in as part of initialising it? Just thought I  
 would post this in case it helps.

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: amd64/139156: commit references a PR
Date: Mon, 26 Oct 2009 08:41:24 +0000 (UTC)

 Author: mav
 Date: Mon Oct 26 08:41:10 2009
 New Revision: 198479
 URL: http://svn.freebsd.org/changeset/base/198479
 
 Log:
   Fix SATA on nVidia MCP55 chipset. It needs some short time to allow BAR(5)
   memory access.
   
   PR:		amd64/128686, amd64/132372, amd64/139156
   MFC after:	3 days
 
 Modified:
   head/sys/dev/ata/chipsets/ata-nvidia.c
 
 Modified: head/sys/dev/ata/chipsets/ata-nvidia.c
 ==============================================================================
 --- head/sys/dev/ata/chipsets/ata-nvidia.c	Mon Oct 26 07:43:41 2009	(r198478)
 +++ head/sys/dev/ata/chipsets/ata-nvidia.c	Mon Oct 26 08:41:10 2009	(r198479)
 @@ -165,7 +165,8 @@ ata_nvidia_chipinit(device_t dev)
  
  	    /* enable control access */
  	    pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) | 0x04,1);
 -
 +	    /* MCP55 seems to need some time to allow r_res2 read. */
 +	    DELAY(10);
  	    if (ctlr->chip->cfg1 & NVQ) {
  		/* clear interrupt status */
  		ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: amd64/139156: commit references a PR
Date: Thu, 29 Oct 2009 09:45:59 +0000 (UTC)

 Author: mav
 Date: Thu Oct 29 09:45:48 2009
 New Revision: 198572
 URL: http://svn.freebsd.org/changeset/base/198572
 
 Log:
   Fix SATA on nVidia MCP55 chipset. It needs some short time to allow BAR(5)
   memory access.
   
   PR:		amd64/128686, amd64/132372, amd64/139156
 
 Modified:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/ata/chipsets/ata-nvidia.c
   stable/8/sys/dev/xen/xenpci/   (props changed)
 
 Modified: stable/8/sys/dev/ata/chipsets/ata-nvidia.c
 ==============================================================================
 --- stable/8/sys/dev/ata/chipsets/ata-nvidia.c	Thu Oct 29 09:45:05 2009	(r198571)
 +++ stable/8/sys/dev/ata/chipsets/ata-nvidia.c	Thu Oct 29 09:45:48 2009	(r198572)
 @@ -165,7 +165,8 @@ ata_nvidia_chipinit(device_t dev)
  
  	    /* enable control access */
  	    pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) | 0x04,1);
 -
 +	    /* MCP55 seems to need some time to allow r_res2 read. */
 +	    DELAY(10);
  	    if (ctlr->chip->cfg1 & NVQ) {
  		/* clear interrupt status */
  		ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: mav 
State-Changed-When: Thu Oct 29 11:54:59 UTC 2009 
State-Changed-Why:  
Fix committed and merged down to 8.0. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=139156 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: amd64/139156: commit references a PR
Date: Thu, 29 Oct 2009 11:52:40 +0000 (UTC)

 Author: mav
 Date: Thu Oct 29 11:52:26 2009
 New Revision: 198580
 URL: http://svn.freebsd.org/changeset/base/198580
 
 Log:
   MFC rev. 198479:
   Fix SATA on nVidia MCP55 chipset. It needs some short time to allow
   BAR(5) memory access.
   
   PR:		amd64/128686, amd64/132372, amd64/139156
   Approved by:	re (kib)
 
 Modified:
   releng/8.0/sys/   (props changed)
   releng/8.0/sys/amd64/include/xen/   (props changed)
   releng/8.0/sys/cddl/contrib/opensolaris/   (props changed)
   releng/8.0/sys/contrib/dev/acpica/   (props changed)
   releng/8.0/sys/contrib/pf/   (props changed)
   releng/8.0/sys/dev/ata/chipsets/ata-nvidia.c
   releng/8.0/sys/dev/xen/xenpci/   (props changed)
 
 Modified: releng/8.0/sys/dev/ata/chipsets/ata-nvidia.c
 ==============================================================================
 --- releng/8.0/sys/dev/ata/chipsets/ata-nvidia.c	Thu Oct 29 11:00:39 2009	(r198579)
 +++ releng/8.0/sys/dev/ata/chipsets/ata-nvidia.c	Thu Oct 29 11:52:26 2009	(r198580)
 @@ -165,7 +165,8 @@ ata_nvidia_chipinit(device_t dev)
  
  	    /* enable control access */
  	    pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) | 0x04,1);
 -
 +	    /* MCP55 seems to need some time to allow r_res2 read. */
 +	    DELAY(10);
  	    if (ctlr->chip->cfg1 & NVQ) {
  		/* clear interrupt status */
  		ATA_OUTL(ctlr->r_res2, offset, 0x00ff00ff);
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
