Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F106976347
D24368.id70410.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1013 B
Referenced Files
None
Subscribers
None
D24368.id70410.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D24368: Export a sysctl count of RX FIFO overrun events.
Attached
Detach File
Event Timeline
Log In to Comment