diff options
| author | Hartmut Brandt <harti@FreeBSD.org> | 2003-10-27 16:21:59 +0000 |
|---|---|---|
| committer | Hartmut Brandt <harti@FreeBSD.org> | 2003-10-27 16:21:59 +0000 |
| commit | 325014126dd8e8c6125dd73ca2c7f6e9d6e33802 (patch) | |
| tree | 6fa9229a3ac9567ecab95369b1ead88f5b222526 /sys/dev/hatm | |
| parent | 6b67dc6f60083b2f695b94445a0afa89d35334a6 (diff) | |
Notes
Diffstat (limited to 'sys/dev/hatm')
| -rw-r--r-- | sys/dev/hatm/if_hatm_intr.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/sys/dev/hatm/if_hatm_intr.c b/sys/dev/hatm/if_hatm_intr.c index 4c768168d1f8..80347d18ca8c 100644 --- a/sys/dev/hatm/if_hatm_intr.c +++ b/sys/dev/hatm/if_hatm_intr.c @@ -236,7 +236,7 @@ hatm_mbuf_alloc(struct hatm_softc *sc, u_int group, struct mbuf *m, hatm_mbuf_page_alloc(sc, group); if ((cf = SLIST_FIRST(&sc->mbuf0_list)) == NULL) { mtx_unlock(&sc->mbuf0_mtx); - return (0); + return (-1); } } SLIST_REMOVE_HEAD(&sc->mbuf0_list, link); @@ -260,7 +260,7 @@ hatm_mbuf_alloc(struct hatm_softc *sc, u_int group, struct mbuf *m, hatm_mbuf_page_alloc(sc, group); if ((cf = SLIST_FIRST(&sc->mbuf1_list)) == NULL) { mtx_unlock(&sc->mbuf1_mtx); - return (0); + return (-1); } } SLIST_REMOVE_HEAD(&sc->mbuf1_list, link); @@ -309,7 +309,7 @@ static void he_intr_rbp(struct hatm_softc *sc, struct herbp *rbp, u_int large, u_int group) { - u_int ntail, upd; + u_int ntail; struct mbuf *m; int error; @@ -319,7 +319,6 @@ he_intr_rbp(struct hatm_softc *sc, struct herbp *rbp, u_int large, rbp->head = (READ4(sc, HE_REGO_RBP_S(large, group)) >> HE_REGS_RBP_HEAD) & (rbp->size - 1); - upd = 0; for (;;) { if ((ntail = rbp->tail + 1) == rbp->size) ntail = 0; @@ -374,12 +373,9 @@ he_intr_rbp(struct hatm_softc *sc, struct herbp *rbp, u_int large, rbp->rbp[rbp->tail].handle <<= HE_REGS_RBRQ_ADDR; rbp->tail = ntail; - upd++; - } - if (upd) { - WRITE4(sc, HE_REGO_RBP_T(large, group), - (rbp->tail << HE_REGS_RBP_TAIL)); } + WRITE4(sc, HE_REGO_RBP_T(large, group), + (rbp->tail << HE_REGS_RBP_TAIL)); } /* |
