Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/sge/if_sge.c
Show First 20 Lines • Show All 1,356 Lines • ▼ Show 20 Lines | sge_intr(void *arg) | ||||
* will increase number of register access and is not correct | * will increase number of register access and is not correct | ||||
* way to handle interrupt moderation but there seems to be | * way to handle interrupt moderation but there seems to be | ||||
* no other way at this time. | * no other way at this time. | ||||
*/ | */ | ||||
for (;;) { | for (;;) { | ||||
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) | if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) | ||||
break; | break; | ||||
if ((status & (INTR_RX_DONE | INTR_RX_IDLE)) != 0) { | if ((status & (INTR_RX_DONE | INTR_RX_IDLE)) != 0) { | ||||
sge_rxeof(sc); | NET_EPOCH_WRAP(sge_rxeof, (sc)); | ||||
/* Wakeup Rx MAC. */ | /* Wakeup Rx MAC. */ | ||||
if ((status & INTR_RX_IDLE) != 0) | if ((status & INTR_RX_IDLE) != 0) | ||||
CSR_WRITE_4(sc, RX_CTL, | CSR_WRITE_4(sc, RX_CTL, | ||||
0x1a00 | 0x000c | RX_CTL_POLL | RX_CTL_ENB); | 0x1a00 | 0x000c | RX_CTL_POLL | RX_CTL_ENB); | ||||
} | } | ||||
if ((status & (INTR_TX_DONE | INTR_TX_IDLE)) != 0) | if ((status & (INTR_TX_DONE | INTR_TX_IDLE)) != 0) | ||||
sge_txeof(sc); | sge_txeof(sc); | ||||
status = CSR_READ_4(sc, IntrStatus); | status = CSR_READ_4(sc, IntrStatus); | ||||
▲ Show 20 Lines • Show All 534 Lines • Show Last 20 Lines |