diff options
author | mjacob <mjacob@FreeBSD.org> | 2000-01-23 03:19:49 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2000-01-23 03:19:49 +0000 |
commit | f014209ceb7d85cccfe93978cb1ca06eca1f3871 (patch) | |
tree | 1b3a03cea377a0393fd495f82837c314cc40a40f /sys/pci | |
parent | a441dee9030c209d23c2884e7a914824cbedb0f8 (diff) | |
download | FreeBSD-src-f014209ceb7d85cccfe93978cb1ca06eca1f3871.zip FreeBSD-src-f014209ceb7d85cccfe93978cb1ca06eca1f3871.tar.gz |
Correctly put the place to mark EOP where we actually do the packet
transmission- this handles the odd and rare case of a list terminating
with a zero length mbuf.
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/if_wx.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/pci/if_wx.c b/sys/pci/if_wx.c index 0b01f5f..e2ee42a 100644 --- a/sys/pci/if_wx.c +++ b/sys/pci/if_wx.c @@ -1042,18 +1042,11 @@ again: td->cmd = 0; td->css = 0; - /* - * Mark the last descriptor with EOP and tell the - * chip to insert a final checksum. - */ - if (m->m_next == NULL) { - td->cmd |= TXCMD_EOP|TXCMD_IFCS; - } if (sc->wx_debug) { printf("%s: XMIT[%d] %p vptr %lx (length %d " - "DMA addr %x) idx %d cmd %x\n", sc->wx_name, + "DMA addr %x) idx %d\n", sc->wx_name, ndesc, m, (long) vptr, td->length, - td->address.lowpart, cidx, td->cmd); + td->address.lowpart, cidx); } ndesc++; cidx = T_NXT_IDX(cidx); @@ -1064,6 +1057,13 @@ again: * the the packet chain described by mb_head. */ if (m == NULL) { + /* + * Mark the last descriptor with EOP and tell the + * chip to insert a final checksum. + */ + wxtd_t *td = &sc->tdescriptors[T_PREV_IDX(cidx)]; + td->cmd = TXCMD_EOP|TXCMD_IFCS; + sc->tbase[sc->tnxtfree].sidx = sc->tnxtfree; sc->tbase[sc->tnxtfree].eidx = cidx; sc->tbase[sc->tnxtfree].next = NULL; |