Changeset 29f9822 in rtems-libbsd
- Timestamp:
- 06/01/22 07:45:13 (19 months ago)
- Branches:
- 5-freebsd-12
- Children:
- 484186e
- Parents:
- 62d320d
- git-author:
- Sebastian Huber <sebastian.huber@…> (06/01/22 07:45:13)
- git-committer:
- Sebastian Huber <sebastian.huber@…> (06/01/22 07:55:25)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rtemsbsd/sys/dev/atsam/if_atsam.c
r62d320d r29f9822 109 109 #define IGNORE_RX_ERR false 110 110 111 #define RX_INTERRUPTS (GMAC_ISR_RCOMP | GMAC_ISR_RXUBR | GMAC_ISR_ROVR) 112 111 113 #define RX_DESC_LOG2 3 112 114 #define RX_DESC_COUNT (1U << RX_DESC_LOG2) … … 188 190 /* Software */ 189 191 uint32_t rx_overrun_errors; 192 uint32_t rx_used_bit_reads; 190 193 uint32_t rx_interrupts; 191 194 uint32_t tx_tur_errors; … … 401 404 402 405 /* Check receive interrupts */ 403 if (__predict_true((is & (GMAC_IER_ROVR | GMAC_IER_RCOMP)) != 0)) { 404 if (__predict_false((is & GMAC_IER_ROVR) != 0)) { 406 if (__predict_true((is & RX_INTERRUPTS) != 0)) { 407 if (__predict_false((is & GMAC_ISR_RXUBR) != 0)) { 408 ++sc->stats.rx_used_bit_reads; 409 } 410 411 if (__predict_false((is & GMAC_ISR_ROVR) != 0)) { 405 412 ++sc->stats.rx_overrun_errors; 406 413 } … … 408 415 ++sc->stats.rx_interrupts; 409 416 410 /* Erase the interrupts for RX completion and errors */411 pHw->GMAC_IDR = GMAC_IER_RCOMP | GMAC_IER_ROVR;417 /* Disable RX interrupts */ 418 pHw->GMAC_IDR = RX_INTERRUPTS; 412 419 413 420 (void)rtems_event_send(sc->rx_daemon_tid, … … 512 519 513 520 /* Enable RX interrupts */ 514 pHw->GMAC_IER = GMAC_IER_RCOMP | GMAC_IER_ROVR;521 pHw->GMAC_IER = RX_INTERRUPTS; 515 522 516 523 (void) rtems_event_receive(ATSAMV7_ETH_RX_EVENT_INTERRUPT, … … 1293 1300 CTLFLAG_RD, &sc->stats.rx_overrun_errors, 0, 1294 1301 "RX overrun errors"); 1302 SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_used_bit_reads", 1303 CTLFLAG_RD, &sc->stats.rx_used_bit_reads, 0, 1304 "RX used bit reads"); 1295 1305 SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rx_interrupts", 1296 1306 CTLFLAG_RD, &sc->stats.rx_interrupts, 0,
Note: See TracChangeset
for help on using the changeset viewer.