bnxt_en: Do not enable legacy TX push on older firmware.
authorMichael Chan <michael.chan@broadcom.com>
Tue, 23 Jun 2020 23:01:36 +0000 (19:01 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 24 Jun 2020 03:13:58 +0000 (20:13 -0700)
Older firmware may not support legacy TX push properly and may not
be disabling it.  So we check certain firmware versions that may
have this problem and disable legacy TX push unconditionally.

Fixes: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt.h

index 0ad8d490975e836a6cfd854d05aa4fa4615e5e4d..f8c50b1d233108989144c2b724628fec0cfd326b 100644 (file)
@@ -6976,7 +6976,8 @@ static int __bnxt_hwrm_func_qcaps(struct bnxt *bp)
                bp->fw_cap |= BNXT_FW_CAP_ERR_RECOVER_RELOAD;
 
        bp->tx_push_thresh = 0;
-       if (flags & FUNC_QCAPS_RESP_FLAGS_PUSH_MODE_SUPPORTED)
+       if ((flags & FUNC_QCAPS_RESP_FLAGS_PUSH_MODE_SUPPORTED) &&
+           BNXT_FW_MAJ(bp) > 217)
                bp->tx_push_thresh = BNXT_TX_PUSH_THRESH;
 
        hw_resc->max_rsscos_ctxs = le16_to_cpu(resp->max_rsscos_ctx);
index 858440e1dcdcc369270bd4fc0a3b2d411c78843b..78e2fd63ac3d565aad90e761ebc003d1c4f6a2f0 100644 (file)
@@ -1749,6 +1749,7 @@ struct bnxt {
        u64                     fw_ver_code;
 #define BNXT_FW_VER_CODE(maj, min, bld, rsv)                   \
        ((u64)(maj) << 48 | (u64)(min) << 32 | (u64)(bld) << 16 | (rsv))
+#define BNXT_FW_MAJ(bp)                ((bp)->fw_ver_code >> 48)
 
        __be16                  vxlan_port;
        u8                      vxlan_port_cnt;