PERFORCE change 33860 for review
Marcel Moolenaar
marcel at FreeBSD.org
Sun Jun 29 16:32:25 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=33860
Change 33860 by marcel at marcel_nfs on 2003/06/29 16:31:25
Attach with a lower priority to dual channel UARTs. This makes
sure that puc(4) will attach if configured. This also means
that if we attach, we will use the first channel only.
Affected files ...
.. //depot/projects/uart/dev/uart/uart_bus_ebus.c#2 edit
Differences ...
==== //depot/projects/uart/dev/uart/uart_bus_ebus.c#2 (text+ko) ====
@@ -63,18 +63,21 @@
{
const char *nm;
struct uart_softc *sc;
+ int error;
sc = device_get_softc(dev);
sc->sc_class = NULL;
nm = ebus_get_name(dev);
- if (!strcmp(nm, "su"))
+ if (!strcmp(nm, "su")) {
sc->sc_class = &uart_ns8250_class;
- else if (!strcmp(nm, "se"))
+ return (uart_bus_probe(dev, 0, 0, 0));
+ }
+ if (!strcmp(nm, "se")) {
sc->sc_class = &uart_sab82532_class;
-
- if (sc->sc_class != NULL)
- return (uart_bus_probe(dev, 0, 0, 0));
+ error = uart_bus_probe(dev, 0, 0, 0);
+ return ((error) ? error : -1);
+ }
return (ENXIO);
}
More information about the p4-projects
mailing list