Bug 139156

Summary: [ata] MCP55 SATA Disks fail to initialise, leading to failure to boot [regression]
Product: Base System Reporter: Lee Packham <lpackham>
Component: amd64Assignee: freebsd-amd64 (Nobody) <amd64>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.txt none

Description Lee Packham 2009-09-26 16:40:01 UTC
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.

Fix: None that I know of.

Patch attached with submission follows:
How-To-Repeat: Connect disk to controller, boot.
Comment 1 Lee Packham 2009-09-27 10:06:06 UTC
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.
Comment 2 dfilter service freebsd_committer freebsd_triage 2009-10-26 08:41:24 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"
Comment 3 dfilter service freebsd_committer freebsd_triage 2009-10-29 09:45:59 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"
Comment 4 dfilter service freebsd_committer freebsd_triage 2009-10-29 11:52:40 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"
Comment 5 Alexander Motin freebsd_committer freebsd_triage 2009-10-29 11:54:59 UTC
State Changed
From-To: open->closed

Fix committed and merged down to 8.0.