Page MenuHomeFreeBSD

D24368.id70410.diff
No OneTemporary

D24368.id70410.diff

Index: sys/dev/uart/uart_bus.h
===================================================================
--- sys/dev/uart/uart_bus.h
+++ sys/dev/uart/uart_bus.h
@@ -111,6 +111,7 @@
int sc_rxput;
int sc_rxget;
int sc_rxfifosz; /* Size of RX FIFO. */
+ int sc_rxoverruns;
/* Transmitter data. */
uint8_t *sc_txbuf;
Index: sys/dev/uart/uart_core.c
===================================================================
--- sys/dev/uart/uart_core.c
+++ sys/dev/uart/uart_core.c
@@ -333,6 +333,7 @@
sc->sc_rxbuf[sc->sc_rxput] = UART_STAT_OVERRUN;
uart_sched_softih(sc, SER_INT_RXREADY);
}
+ sc->sc_rxoverruns++;
UART_FLUSH(sc, UART_FLUSH_RECEIVER);
return (0);
}
@@ -740,6 +741,12 @@
if (sc->sc_sysdev != NULL)
sc->sc_sysdev->hwmtx = sc->sc_hwmtx;
+
+ if (sc->sc_rxfifosz > 1)
+ SYSCTL_ADD_INT(device_get_sysctl_ctx(dev),
+ SYSCTL_CHILDREN(device_get_sysctl_tree(dev)), OID_AUTO,
+ "rx_overruns", CTLFLAG_RD, &sc->sc_rxoverruns, 0,
+ "Receive overruns");
return (0);

File Metadata

Mime Type
text/plain
Expires
Thu, Jan 9, 9:30 AM (4 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15731281
Default Alt Text
D24368.id70410.diff (1013 B)

Event Timeline