Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 Feb 2007 14:28:59 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 114239 for review
Message-ID:  <200702081428.l18ESxie018794@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=114239

Change 114239 by rwatson@rwatson_noisy on 2007/02/08 14:28:50

	Workaround for VPD problems on my test hardware.  Disabled by
	default.

Affected files ...

.. //depot/projects/zcopybpf/src/sys/dev/pci/pci.c#2 edit

Differences ...

==== //depot/projects/zcopybpf/src/sys/dev/pci/pci.c#2 (text+ko) ====

@@ -244,6 +244,11 @@
     &pci_do_power_resume, 1,
   "Transition from D3 -> D0 on resume.");
 
+static int pci_do_vpd = 1;
+TUNABLE_INT("hw.pci.enable_vpd", &pci_do_vpd);
+SYSCTL_INT(_hw_pci, OID_AUTO, enable_vpd, CTLFLAG_RW, &pci_do_vpd, 1,
+    "Enable support for VPD.");
+
 static int pci_do_msi = 1;
 TUNABLE_INT("hw.pci.enable_msi", &pci_do_msi);
 SYSCTL_INT(_hw_pci, OID_AUTO, enable_msi, CTLFLAG_RW, &pci_do_msi, 1,
@@ -568,8 +573,10 @@
 			cfg->msix.msix_pba_offset = val & ~PCIM_MSIX_BIR_MASK;
 			break;
 		case PCIY_VPD:		/* PCI Vital Product Data */
-			cfg->vpd.vpd_reg = ptr;
-			pci_read_vpd(pcib, cfg);
+			if (pci_do_vpd) {
+				cfg->vpd.vpd_reg = ptr;
+				pci_read_vpd(pcib, cfg);
+			}
 			break;
 		case PCIY_SUBVENDOR:
 			/* Should always be true. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200702081428.l18ESxie018794>