Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143611637
D24368.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D24368.diff
View Options
Index: head/sys/dev/uart/uart_bus.h
===================================================================
--- head/sys/dev/uart/uart_bus.h
+++ head/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: head/sys/dev/uart/uart_core.c
===================================================================
--- head/sys/dev/uart/uart_core.c
+++ head/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
Sun, Feb 1, 1:41 AM (5 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28242671
Default Alt Text
D24368.diff (1 KB)
Attached To
Mode
D24368: Export a sysctl count of RX FIFO overrun events.
Attached
Detach File
Event Timeline
Log In to Comment