X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/blobdiff_plain/d31d6d83b77479ab4a835214231c16f30b9ea28f..ea5f4f9e8c49126e9adc10a0e5cce3abcf78cec7:/sys/bus/pci/pci.c diff --git a/sys/bus/pci/pci.c b/sys/bus/pci/pci.c index 3091e10f21..f752fa102b 100644 --- a/sys/bus/pci/pci.c +++ b/sys/bus/pci/pci.c @@ -1919,8 +1919,8 @@ pci_alloc_msi_method(device_t dev, device_t child, int *rid, int count, if (bootverbose) { device_printf(child, - "attempting to allocate %d MSI vectors (%d supported)\n", - count, cfg->msi.msi_msgnum); + "attempting to allocate %d MSI vector%s (%d supported)\n", + count, count > 1 ? "s" : "", cfg->msi.msi_msgnum); } if (start_cpuid < 0) @@ -4098,22 +4098,16 @@ pci_alloc_1intr(device_t dev, int msi_enable, int *rid0, u_int *flags0) { int rid, type; u_int flags; - char env[64]; rid = 0; type = PCI_INTR_TYPE_LEGACY; flags = RF_SHAREABLE | RF_ACTIVE; - ksnprintf(env, sizeof(env), "hw.%s.msi.enable", - device_get_nameunit(dev)); - kgetenv_int(env, &msi_enable); - + device_getenv_int(dev, "msi.enable", &msi_enable); if (msi_enable) { int cpu = -1; - ksnprintf(env, sizeof(env), "hw.%s.msi.cpu", - device_get_nameunit(dev)); - kgetenv_int(env, &cpu); + device_getenv_int(dev, "msi.cpu", &cpu); if (cpu >= ncpus) cpu = ncpus - 1;