diff options
author | wpaul <wpaul@FreeBSD.org> | 2001-06-15 18:43:19 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2001-06-15 18:43:19 +0000 |
commit | d524f968646bb58b7756f0a1338163c8cf27a1dc (patch) | |
tree | b2014770c8484095910d1a7ce52e36812faf72f9 /sys/dev/nge | |
parent | 67653866aa83c06cbc92828ae2988bbeea1e776d (diff) | |
download | FreeBSD-src-d524f968646bb58b7756f0a1338163c8cf27a1dc.zip FreeBSD-src-d524f968646bb58b7756f0a1338163c8cf27a1dc.tar.gz |
Fix TX bug: when using TCP/IP checksum offload on TX, we tell the chip
we want the checksums calculated on a per-packet basis using control bits
in the extsts field of the DMA descriptor structure. For TX, the chip
seems to want these bits set in the field of the first descriptor in
a fragment chain, not the last.
Diffstat (limited to 'sys/dev/nge')
-rw-r--r-- | sys/dev/nge/if_nge.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/nge/if_nge.c b/sys/dev/nge/if_nge.c index 861edd2..7b5baa6 100644 --- a/sys/dev/nge/if_nge.c +++ b/sys/dev/nge/if_nge.c @@ -1546,16 +1546,16 @@ static int nge_encap(sc, m_head, txidx) if (m != NULL) return(ENOBUFS); - sc->nge_ldata->nge_tx_list[cur].nge_extsts = 0; + sc->nge_ldata->nge_tx_list[*txidx].nge_extsts = 0; if (m_head->m_pkthdr.csum_flags) { if (m_head->m_pkthdr.csum_flags & CSUM_IP) - sc->nge_ldata->nge_tx_list[cur].nge_extsts |= + sc->nge_ldata->nge_tx_list[*txidx].nge_extsts |= NGE_TXEXTSTS_IPCSUM; if (m_head->m_pkthdr.csum_flags & CSUM_TCP) - sc->nge_ldata->nge_tx_list[cur].nge_extsts |= + sc->nge_ldata->nge_tx_list[*txidx].nge_extsts |= NGE_TXEXTSTS_TCPCSUM; if (m_head->m_pkthdr.csum_flags & CSUM_UDP) - sc->nge_ldata->nge_tx_list[cur].nge_extsts |= + sc->nge_ldata->nge_tx_list[*txidx].nge_extsts |= NGE_TXEXTSTS_UDPCSUM; } |