diff options
author | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2009-05-29 06:57:22 +0000 |
---|---|---|
committer | Marco Pfatschbacher <mpf@cvs.openbsd.org> | 2009-05-29 06:57:22 +0000 |
commit | c89a694cc8c38858b71c9bde18b1d54c07e17c8b (patch) | |
tree | c76821e4a2fa45bee7914f468ced86d67cfb0dab | |
parent | 48fdaf9f611a38f0968d165d5be96074f7b6da11 (diff) |
Return the RX descriptor after pointing it to the new mbuf.
Otherwise the card can mess with mbufs that have been given to the
stack already. Fixes panics seen with a high rate of of small
packets and POOL_DEBUG enabled.
OK sthen@, chris@
-rw-r--r-- | sys/dev/pci/if_vr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 686769c8eee..9aa602e23e2 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.93 2009/05/21 14:34:35 sthen Exp $ */ +/* $OpenBSD: if_vr.c,v 1.94 2009/05/29 06:57:21 mpf Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1587,9 +1587,9 @@ vr_alloc_mbuf(struct vr_softc *sc, struct vr_chain_onefrag *r, struct mbuf *mb) /* Reinitialize the RX descriptor */ d = r->vr_ptr; - d->vr_status = htole32(VR_RXSTAT); d->vr_data = htole32(r->vr_map->dm_segs[0].ds_addr); d->vr_ctl = htole32(VR_RXCTL | VR_RXLEN); + d->vr_status = htole32(VR_RXSTAT); bus_dmamap_sync(sc->sc_dmat, sc->sc_listmap, 0, sc->sc_listmap->dm_mapsize, |