git: 797e480cba88 - main - e1000: disable TSO on lem(4) and em(4)

From: Kevin Bowling <kbowling_at_FreeBSD.org>
Date: Tue, 15 Aug 2023 00:33:20 UTC
The branch main has been updated by kbowling:

URL: https://cgit.FreeBSD.org/src/commit/?id=797e480cba8834e584062092c098e60956d28180

commit 797e480cba8834e584062092c098e60956d28180
Author:     Kevin Bowling <kbowling@FreeBSD.org>
AuthorDate: 2023-08-15 00:25:39 +0000
Commit:     Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2023-08-15 00:25:39 +0000

    e1000: disable TSO on lem(4) and em(4)
    
    Disable TSO on lem(4) and em(4) until a ring stall can be debugged.
    
    I am not able to reproduce the issue on lem(4) but disabling there in
    abundance of caution in case the issue is not specific to em(4).
    
    Reported by:    grog
---
 sys/dev/e1000/if_em.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 069ff37c6a75..ca6bf59b5dd1 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -906,6 +906,9 @@ em_if_attach_pre(if_ctx_t ctx)
 		scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO |
 		    CSUM_IP6_TCP | CSUM_IP6_UDP;
 
+		/* Disable TSO on all em(4) until ring stalls can be debugged */
+		scctx->isc_capenable &= ~IFCAP_TSO;
+
 		/*
 		 * Disable TSO on SPT due to errata that downclocks DMA performance
 		 * i218-i219 Specification Update 1.5.4.5
@@ -938,6 +941,9 @@ em_if_attach_pre(if_ctx_t ctx)
 		scctx->isc_tx_csum_flags = CSUM_TCP | CSUM_UDP | CSUM_IP_TSO |
 		    CSUM_IP6_TCP | CSUM_IP6_UDP;
 
+		/* Disable TSO on all lem(4) until ring stalls can be debugged */
+		scctx->isc_capenable &= ~IFCAP_TSO;
+
 		/* 82541ER doesn't do HW tagging */
 		if (hw->device_id == E1000_DEV_ID_82541ER ||
 		    hw->device_id == E1000_DEV_ID_82541ER_LOM) {