summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryar <yar@FreeBSD.org>2004-05-22 13:59:17 +0000
committeryar <yar@FreeBSD.org>2004-05-22 13:59:17 +0000
commit83dd6eda94f0206ed7b7850fc8d36419c2688e2e (patch)
treed72ec7f0b86304baaf52ede74cc1acd576e3a712
parent8900f1eedb6df7009cea36e709272db217edfb80 (diff)
downloadFreeBSD-src-83dd6eda94f0206ed7b7850fc8d36419c2688e2e.zip
FreeBSD-src-83dd6eda94f0206ed7b7850fc8d36419c2688e2e.tar.gz
Don't forget to reset if_hwassist back to 0 when hardware checksumming
is being turned off, or else TCP/IP will keep assigning the job to us. Drivers themselves should consult if_capenable, not if_hwassist--the latter is for the TCP/IP stack.
-rw-r--r--sys/dev/gx/if_gx.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/gx/if_gx.c b/sys/dev/gx/if_gx.c
index 9c54680..9def700 100644
--- a/sys/dev/gx/if_gx.c
+++ b/sys/dev/gx/if_gx.c
@@ -478,6 +478,8 @@ gx_init(void *xsc)
/* setup transmit checksum control */
if (ifp->if_capenable & IFCAP_TXCSUM)
ifp->if_hwassist = GX_CSUM_FEATURES;
+ else
+ ifp->if_hwassist = 0;
ctrl |= GX_RXC_STRIP_ETHERCRC; /* not on 82542? */
CSR_WRITE_4(gx, GX_RX_CONTROL, ctrl);
@@ -1530,7 +1532,7 @@ printf("overflow(2): %d, %d\n", cnt, GX_TX_RING_CNT);
tx->tx_addr = vtophys(mtod(m, vm_offset_t));
tx->tx_status = 0;
tx->tx_len = m->m_len;
- if (gx->arpcom.ac_if.if_hwassist) {
+ if (gx->arpcom.ac_if.if_capenable & IFCAP_TXCSUM) {
tx->tx_type = 1;
tx->tx_command = GX_TXTCP_EXTENSION;
tx->tx_options = csumopts;
OpenPOWER on IntegriCloud