1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-29 12:03:03 +00:00

As VPD support still causes hard hangs on boot with some hardware, add a

tunable allowing automatic parsing of VPD data to be disabled.  The
default is left as-is; if you are having problems with hard hangs at boot
due to VPD, try setting hw.pci.enable_vpd=0.  A proper architectural
solution has been under discussion for some time, but this allows me to
boot my test machines in the mean time.

Submitted by:	bz
Head nod:	jmg
This commit is contained in:
Robert Watson 2007-02-08 14:33:07 +00:00
parent 6a000036fc
commit 7222b40265
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166566

View File

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