diff options
author | phk <phk@FreeBSD.org> | 2007-04-22 15:09:03 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2007-04-22 15:09:03 +0000 |
commit | db8dcec8015c6fbc747411dcd0f933d6e0a5f81e (patch) | |
tree | 5945d8e7209aab2262af1527aa1a4b2475e4e798 /sys/dev/vr | |
parent | bf9c7e516dfa5f1675da012fc0fed5d6fa348f1a (diff) | |
download | FreeBSD-src-db8dcec8015c6fbc747411dcd0f933d6e0a5f81e.zip FreeBSD-src-db8dcec8015c6fbc747411dcd0f933d6e0a5f81e.tar.gz |
Initialize the physical next pointer in the tx descriptors when we
initialize instead of in the start routine.
Diffstat (limited to 'sys/dev/vr')
-rw-r--r-- | sys/dev/vr/if_vr.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/vr/if_vr.c b/sys/dev/vr/if_vr.c index 688f3b1..1af47fe 100644 --- a/sys/dev/vr/if_vr.c +++ b/sys/dev/vr/if_vr.c @@ -870,12 +870,17 @@ vr_list_tx_init(struct vr_softc *sc) ld = sc->vr_ldata; for (i = 0; i < VR_TX_LIST_CNT; i++) { cd->vr_tx_chain[i].vr_ptr = &ld->vr_tx_list[i]; - if (i == (VR_TX_LIST_CNT - 1)) + if (i == (VR_TX_LIST_CNT - 1)) { cd->vr_tx_chain[i].vr_nextdesc = - &cd->vr_tx_chain[0]; - else + &cd->vr_tx_chain[0]; + ld->vr_tx_list[i].vr_nextphys = + vtophys(&ld->vr_tx_list[0]); + } else { cd->vr_tx_chain[i].vr_nextdesc = &cd->vr_tx_chain[i + 1]; + ld->vr_tx_list[i].vr_nextphys = + vtophys(&ld->vr_tx_list[i + 1]); + } } cd->vr_tx_cons = cd->vr_tx_prod = &cd->vr_tx_chain[0]; @@ -1447,10 +1452,6 @@ vr_start_locked(struct ifnet *ifp) f->vr_ctl = cval; f->vr_status = 0; n_tx = n_tx->vr_nextdesc; - f->vr_nextphys = vtophys(n_tx->vr_ptr); - KASSERT(!(f->vr_nextphys & 0xf), - ("vr_nextphys not 16 byte aligned 0x%x", - f->vr_nextphys)); } KASSERT(f != NULL, ("if_vr: no packet processed")); |