changeset 10012:5655ac301a3f

6846435 Fast Reboot stops working on certain Sun Fire X2x00 M2 systems when nv_sata_40bit_dma is enabled 6851011 Solaris Installation panics immediately after Configuring /dev in nv_sata on MSI K9N SLI system
author Guoli Shu<Kerry.Shu@Sun.COM>
date Wed, 01 Jul 2009 15:26:37 -0700
parents c75cad68670b
children 785c0044f0cd
files usr/src/uts/common/io/sata/adapters/nv_sata/nv_sata.c
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/uts/common/io/sata/adapters/nv_sata/nv_sata.c	Wed Jul 01 14:02:39 2009 -0700
+++ b/usr/src/uts/common/io/sata/adapters/nv_sata/nv_sata.c	Wed Jul 01 15:26:37 2009 -0700
@@ -213,7 +213,7 @@
 	4,			/* dma_attr_align */
 	1,			/* dma_attr_burstsizes. */
 	1,			/* dma_attr_minxfer */
-	NV_BM_64K_BOUNDARY - 1,	/* dma_attr_maxxfer including all cookies */
+	0xffffffffull,		/* dma_attr_maxxfer including all cookies */
 	0xffffffffull,		/* dma_attr_seg */
 	NV_DMA_NSEGS,		/* dma_attr_sgllen */
 	512,			/* dma_attr_granular */
@@ -352,8 +352,8 @@
  */
 static void *nv_statep	= NULL;
 
-/* This can be disabled if there are any problems with 40-bit DMA */
-int nv_sata_40bit_dma = B_TRUE;
+/* We still have problems in 40-bit DMA support, so disable it by default */
+int nv_sata_40bit_dma = B_FALSE;
 
 static sata_tran_hotplug_ops_t nv_hotplug_ops = {
 	SATA_TRAN_HOTPLUG_OPS_REV_1,	/* structure version */
@@ -2257,7 +2257,7 @@
 			reg32 = pci_config_get32(pci_conf_handle,
 			    NV_SATA_CFG_20);
 			pci_config_put32(pci_conf_handle, NV_SATA_CFG_20,
-			    reg32 |NV_40BIT_PRD);
+			    reg32 | NV_40BIT_PRD);
 		} else {
 			NVLOG((NVDBG_INIT, nvp->nvp_ctlp, nvp,
 			    "40-bit DMA disabled by nv_sata_40bit_dma"));
@@ -2345,8 +2345,10 @@
 	 * to enable access to the bar5 registers.
 	 */
 	reg32 = pci_config_get32(pci_conf_handle, NV_SATA_CFG_20);
-	pci_config_put32(pci_conf_handle, NV_SATA_CFG_20,
-	    reg32 | NV_BAR5_SPACE_EN);
+	if (!(reg32 & NV_BAR5_SPACE_EN)) {
+		pci_config_put32(pci_conf_handle, NV_SATA_CFG_20,
+		    reg32 | NV_BAR5_SPACE_EN);
+	}
 
 	/*
 	 * Determine if this is ck804 or mcp5x.  ck804 will map in the