PERFORCE change 93224 for review
Marcel Moolenaar
marcel at FreeBSD.org
Mon Mar 13 02:45:05 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=93224
Change 93224 by marcel at marcel_nfs on 2006/03/13 02:44:56
The source specific interrupt handlers return whether
the interrupt condition is cleared or not.
Affected files ...
.. //depot/projects/uart/dev/uart/uart_bus.h#40 edit
.. //depot/projects/uart/dev/uart/uart_core.c#46 edit
Differences ...
==== //depot/projects/uart/dev/uart/uart_bus.h#40 (text+ko) ====
@@ -140,7 +140,7 @@
int uart_bus_attach(device_t dev);
int uart_bus_detach(device_t dev);
-driver_intr_t *uart_bus_ihand(device_t dev, int ipend);
+serdev_intr_t *uart_bus_ihand(device_t dev, int ipend);
int uart_bus_probe(device_t dev, int regshft, int rclk, int rid, int chan);
int uart_bus_reset(device_t dev);
==== //depot/projects/uart/dev/uart/uart_core.c#46 (text+ko) ====
@@ -93,7 +93,7 @@
* the exceptional nature of the break condition, so we permit ourselves
* to be sloppy.
*/
-static __inline void
+static __inline int
uart_intr_break(void *arg)
{
struct uart_softc *sc = arg;
@@ -101,11 +101,12 @@
#if defined(KDB) && defined(BREAK_TO_DEBUGGER)
if (sc->sc_sysdev != NULL && sc->sc_sysdev->type == UART_DEV_CONSOLE) {
kdb_enter("Line break on console");
- return;
+ return (0);
}
#endif
if (sc->sc_opened)
uart_sched_softih(sc, SER_INT_BREAK);
+ return (0);
}
/*
@@ -123,7 +124,7 @@
* token represents the loss of at least one, but possible more bytes in
* the input stream.
*/
-static __inline void
+static __inline int
uart_intr_overrun(void *arg)
{
struct uart_softc *sc = arg;
@@ -135,12 +136,13 @@
uart_sched_softih(sc, SER_INT_RXREADY);
}
UART_FLUSH(sc, UART_FLUSH_RECEIVER);
+ return (0);
}
/*
* Received data ready.
*/
-static __inline void
+static __inline int
uart_intr_rxready(void *arg)
{
struct uart_softc *sc = arg;
@@ -162,6 +164,7 @@
uart_sched_softih(sc, SER_INT_RXREADY);
else
sc->sc_rxput = sc->sc_rxget; /* Ignore received data. */
+ return (1);
}
/*
@@ -171,7 +174,7 @@
* bits. This is to avoid loosing state transitions due to having more
* than 1 hardware interrupt between software interrupts.
*/
-static __inline void
+static __inline int
uart_intr_sigchg(void *arg)
{
struct uart_softc *sc = arg;
@@ -202,12 +205,13 @@
if (sc->sc_opened)
uart_sched_softih(sc, SER_INT_SIGCHG);
+ return (0);
}
/*
* The transmitter can accept more data.
*/
-static __inline void
+static __inline int
uart_intr_txidle(void *arg)
{
struct uart_softc *sc = arg;
@@ -216,6 +220,7 @@
sc->sc_txbusy = 0;
uart_sched_softih(sc, SER_INT_TXIDLE);
}
+ return (0);
}
static void
@@ -238,7 +243,7 @@
}
}
-driver_intr_t *
+serdev_intr_t *
uart_bus_ihand(device_t dev, int ipend)
{
More information about the p4-projects
mailing list