Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jun 2003 16:32:22 -0700 (PDT)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 33860 for review
Message-ID:  <200306292332.h5TNWMt1019004@repoman.freebsd.org>

index | next in thread | raw e-mail

http://perforce.freebsd.org/chv.cgi?CH=33860

Change 33860 by marcel@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);
 }


help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200306292332.h5TNWMt1019004>