1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

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
This commit is contained in:
Marius Strobl 2004-08-25 22:15:33 +00:00
parent e5d264a34b
commit 8f0882f544
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134312

View File

@ -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);