From 8f0882f54460353c74ba352f3a6a634de208394b Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Wed, 25 Aug 2004 22:15:33 +0000 Subject: [PATCH] Don't call uart_bus_probe() for non-matching PnP-devices. Trying to probe the keyboard controller with uart_bus_probe() caused a hang here on an i386 machine. Approved by: marcel --- sys/dev/uart/uart_bus_isa.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/dev/uart/uart_bus_isa.c b/sys/dev/uart/uart_bus_isa.c index 72e054987954..82dd59a45496 100644 --- a/sys/dev/uart/uart_bus_isa.c +++ b/sys/dev/uart/uart_bus_isa.c @@ -155,15 +155,14 @@ uart_isa_probe(device_t dev) parent = device_get_parent(dev); sc = device_get_softc(dev); - if (!ISA_PNP_PROBE(parent, dev, isa_ns8250_ids)) { + /* Probe PnP _and_ non-PnP ns8250 here. */ + if (ISA_PNP_PROBE(parent, dev, isa_ns8250_ids) != ENXIO) { sc->sc_class = &uart_ns8250_class; return (uart_bus_probe(dev, 0, 0, 0, 0)); } /* Add checks for non-ns8250 IDs here. */ - - sc->sc_class = &uart_ns8250_class; - return (uart_bus_probe(dev, 0, 0, 0, 0)); + return (ENXIO); } DRIVER_MODULE(uart, isa, uart_isa_driver, uart_devclass, 0, 0);