diff options
author | rwatson <rwatson@FreeBSD.org> | 2007-02-08 14:33:07 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2007-02-08 14:33:07 +0000 |
commit | fb9b1cf91c7c42234a3cb401566bb5b671d35d3d (patch) | |
tree | ad56c4358c829377e9d843347ea6344b987327c9 /sys/dev/pci | |
parent | 08a6b49351509c52787a1d71ac0176a74f136b08 (diff) | |
download | FreeBSD-src-fb9b1cf91c7c42234a3cb401566bb5b671d35d3d.zip FreeBSD-src-fb9b1cf91c7c42234a3cb401566bb5b671d35d3d.tar.gz |
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
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/pci.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 7ef07e2..63a7534 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -244,6 +244,11 @@ SYSCTL_INT(_hw_pci, OID_AUTO, do_power_resume, CTLFLAG_RW, &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 @@ pci_read_extcap(device_t pcib, pcicfgregs *cfg) 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. */ |