From bbb169f2a4fc85cf470daf2f6dfffed545a5e7a7 Mon Sep 17 00:00:00 2001 From: Marcel Moolenaar Date: Sat, 6 Jun 2015 15:51:11 +0000 Subject: [PATCH] Don't return -10000 as the probe priority. That's lower than what BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the kernel or preloaded, will render your system useless by virtue of attaching to your PCI busses. Return BUS_PROBE_GENERIC instead. It's just the next priority up from BUS_PROBE_HOOVER. No other meaning has been give to its use. While BUS_PROBE_DEFAULT seems like a better candidate, it's hard not to think that there must be some reason why these drivers return -10000 in the first place. Differential Revision: D2705 --- sys/dev/pci/eisa_pci.c | 2 +- sys/dev/pci/hostb_pci.c | 2 +- sys/dev/pci/ignore_pci.c | 2 +- sys/dev/pci/isa_pci.c | 2 +- sys/dev/pci/pci_pci.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/pci/eisa_pci.c b/sys/dev/pci/eisa_pci.c index 98fa2707c30..a6c4d4bb6b7 100644 --- a/sys/dev/pci/eisa_pci.c +++ b/sys/dev/pci/eisa_pci.c @@ -100,7 +100,7 @@ eisab_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-EISA bridge"); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } diff --git a/sys/dev/pci/hostb_pci.c b/sys/dev/pci/hostb_pci.c index 4e28691d31f..9e3a5084fdf 100644 --- a/sys/dev/pci/hostb_pci.c +++ b/sys/dev/pci/hostb_pci.c @@ -63,7 +63,7 @@ pci_hostb_probe(device_t dev) pci_get_subclass(dev) == PCIS_BRIDGE_HOST) { device_set_desc(dev, "Host to PCI bridge"); device_quiet(dev); - return (-10000); + return (BUS_PROBE_GENERIC); } return (ENXIO); } diff --git a/sys/dev/pci/ignore_pci.c b/sys/dev/pci/ignore_pci.c index 1ae9d34545c..876fa963555 100644 --- a/sys/dev/pci/ignore_pci.c +++ b/sys/dev/pci/ignore_pci.c @@ -66,7 +66,7 @@ ignore_pci_probe(device_t dev) case 0x10001042ul: /* SMC 37C665 */ device_set_desc(dev, "ignored"); device_quiet(dev); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } diff --git a/sys/dev/pci/isa_pci.c b/sys/dev/pci/isa_pci.c index 7819b7e4cc8..2c06cd7b4ac 100644 --- a/sys/dev/pci/isa_pci.c +++ b/sys/dev/pci/isa_pci.c @@ -154,7 +154,7 @@ isab_pci_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-ISA bridge"); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); } diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 585ee863bc4..7edbd539b01 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -890,7 +890,7 @@ pcib_probe(device_t dev) if ((pci_get_class(dev) == PCIC_BRIDGE) && (pci_get_subclass(dev) == PCIS_BRIDGE_PCI)) { device_set_desc(dev, "PCI-PCI bridge"); - return(-10000); + return (BUS_PROBE_GENERIC); } return(ENXIO); }