diff options
-rw-r--r-- | sys/dev/pci/if_cas.c | 8 | ||||
-rw-r--r-- | sys/dev/pci/if_casreg.h | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/pci/if_cas.c b/sys/dev/pci/if_cas.c index c642f242949..35b09af3c41 100644 --- a/sys/dev/pci/if_cas.c +++ b/sys/dev/pci/if_cas.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cas.c,v 1.18 2008/05/31 17:03:52 kettenis Exp $ */ +/* $OpenBSD: if_cas.c,v 1.19 2008/05/31 22:49:03 kettenis Exp $ */ /* * @@ -1925,11 +1925,11 @@ cas_tint(struct cas_softc *sc, u_int32_t status) { struct ifnet *ifp = &sc->sc_arpcom.ac_if; struct cas_sxd *sd; - u_int32_t cons, hwcons; + u_int32_t cons, comp; - hwcons = status >> 19; + comp = bus_space_read_4(sc->sc_memt, sc->sc_memh, CAS_TX_COMPLETION); cons = sc->sc_tx_cons; - while (cons != hwcons) { + while (cons != comp) { sd = &sc->sc_txd[cons]; if (sd->sd_mbuf != NULL) { bus_dmamap_sync(sc->sc_dmatag, sd->sd_map, 0, diff --git a/sys/dev/pci/if_casreg.h b/sys/dev/pci/if_casreg.h index 11e3e1a6b13..28ed28fdd43 100644 --- a/sys/dev/pci/if_casreg.h +++ b/sys/dev/pci/if_casreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_casreg.h,v 1.9 2007/11/27 16:22:13 martynas Exp $ */ +/* $OpenBSD: if_casreg.h,v 1.10 2008/05/31 22:49:03 kettenis Exp $ */ /* * @@ -149,6 +149,7 @@ #define CAS_TX_MAXBURST4 0x208c #define CAS_TX_KICK CAS_TX_KICK3 +#define CAS_TX_COMPLETION CAS_TX_COMPLETION3 #define CAS_TX_RING_PTR_LO CAS_TX_RING_PTR_LO3 #define CAS_TX_RING_PTR_HI CAS_TX_RING_PTR_HI3 |