Set ONES (must be ones) bits in tmd1 of tx descriptors.

This fix avoids VMware 3.0/WinXP to crash.
This commit is contained in:
onoe 2001-11-27 13:49:03 +00:00
parent b2dc60987f
commit afdb23ddea
1 changed files with 10 additions and 12 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_pcn.c,v 1.5 2001/11/13 07:48:44 lukem Exp $ */ /* $NetBSD: if_pcn.c,v 1.6 2001/11/27 13:49:03 onoe Exp $ */
/* /*
* Copyright 2001 Wasabi Systems, Inc. * Copyright 2001 Wasabi Systems, Inc.
@ -65,7 +65,7 @@
*/ */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.5 2001/11/13 07:48:44 lukem Exp $"); __KERNEL_RCSID(0, "$NetBSD: if_pcn.c,v 1.6 2001/11/27 13:49:03 onoe Exp $");
#include "bpfilter.h" #include "bpfilter.h"
@ -1000,11 +1000,10 @@ pcn_start(struct ifnet *ifp)
sc->sc_txdescs[nexttx].tmd2 = sc->sc_txdescs[nexttx].tmd2 =
htole32(dmamap->dm_segs[seg].ds_addr); htole32(dmamap->dm_segs[seg].ds_addr);
sc->sc_txdescs[nexttx].tmd1 = sc->sc_txdescs[nexttx].tmd1 =
((nexttx == sc->sc_txnext) ? 0 : htole32(LE_T1_ONES |
htole32(LE_T1_OWN)) | (nexttx == sc->sc_txnext ? 0 : LE_T1_OWN) |
htole32((LE_BCNT(dmamap->dm_segs[ (LE_BCNT(dmamap->dm_segs[seg].ds_len) &
seg].ds_len) & LE_T1_BCNT_MASK));
LE_T1_BCNT_MASK));
lasttx = nexttx; lasttx = nexttx;
} }
} else { } else {
@ -1021,11 +1020,10 @@ pcn_start(struct ifnet *ifp)
htole32(dmamap->dm_segs[seg].ds_addr); htole32(dmamap->dm_segs[seg].ds_addr);
sc->sc_txdescs[nexttx].tmd2 = 0; sc->sc_txdescs[nexttx].tmd2 = 0;
sc->sc_txdescs[nexttx].tmd1 = sc->sc_txdescs[nexttx].tmd1 =
((nexttx == sc->sc_txnext) ? 0 : htole32(LE_T1_ONES |
htole32(LE_T1_OWN)) | (nexttx == sc->sc_txnext ? 0 : LE_T1_OWN) |
htole32((LE_BCNT(dmamap->dm_segs[ (LE_BCNT(dmamap->dm_segs[seg].ds_len) &
seg].ds_len) & LE_T1_BCNT_MASK));
LE_T1_BCNT_MASK));
lasttx = nexttx; lasttx = nexttx;
} }
} }