summaryrefslogtreecommitdiff
path: root/sys/dev/txp
diff options
context:
space:
mode:
authorBill Paul <wpaul@FreeBSD.org>2001-07-27 19:38:56 +0000
committerBill Paul <wpaul@FreeBSD.org>2001-07-27 19:38:56 +0000
commit2be840b3476ace2c083b547e0d5ac619914a790d (patch)
tree28e6e6c7a6e80f83afc2203c352831402500e498 /sys/dev/txp
parent54d6d2dfaf680c98bdf7a6297e1763112c9d55e8 (diff)
Notes
Diffstat (limited to 'sys/dev/txp')
-rw-r--r--sys/dev/txp/if_txp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/txp/if_txp.c b/sys/dev/txp/if_txp.c
index aa666bcc2700..76625e7e0163 100644
--- a/sys/dev/txp/if_txp.c
+++ b/sys/dev/txp/if_txp.c
@@ -321,6 +321,7 @@ txp_attach(dev)
sc->sc_ldata = contigmalloc(sizeof(struct txp_ldata), M_DEVBUF,
M_NOWAIT, 0, 0xffffffff, PAGE_SIZE, 0);
+ bzero(sc->sc_ldata, sizeof(struct txp_ldata));
if (txp_alloc_rings(sc)) {
txp_release_resources(sc);
@@ -1039,12 +1040,15 @@ txp_alloc_rings(sc)
sc->sc_rxbufs = (struct txp_rxbuf_desc *)&ld->txp_rxbufs;
for (i = 0; i < RXBUF_ENTRIES; i++) {
+ struct txp_swdesc *sd;
if (sc->sc_rxbufs[i].rb_sd != NULL)
continue;
sc->sc_rxbufs[i].rb_sd = malloc(sizeof(struct txp_swdesc),
M_DEVBUF, M_NOWAIT);
if (sc->sc_rxbufs[i].rb_sd == NULL)
return(ENOBUFS);
+ sd = sc->sc_rxbufs[i].rb_sd;
+ sd->sd_mbuf = NULL;
}
sc->sc_rxbufprod = 0;