From ffc39620102dfe62711fadb9a297b66aee816013 Mon Sep 17 00:00:00 2001 From: Suresh Reddy Date: Tue, 6 Feb 2018 08:52:42 -0500 Subject: be2net: Handle transmit completion errors in Lancer If the driver receives a TX CQE with status as 0x1 or 0x9 or 0xb, the completion indexes should not be used. The driver must stop consuming CQEs from this TXQ/CQ. The TXQ from this point on-wards to be in a bad state. Driver should destroy and recreate the TXQ. 0x1: LANCER_TX_COMP_LSO_ERR 0x9 LANCER_TX_COMP_SGE_ERR 0xb: LANCER_TX_COMP_PARITY_ERR Reset the adapter if driver sees this error in TX completion. Also adding sge error counter in ethtool stats. Signed-off-by: Suresh Reddy Signed-off-by: David S. Miller --- drivers/net/ethernet/emulex/benet/be.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/net/ethernet/emulex/benet/be.h') diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 8984c4938881..382891f81e09 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -248,6 +248,7 @@ struct be_tx_stats { u32 tx_spoof_check_err; u32 tx_qinq_err; u32 tx_internal_parity_err; + u32 tx_sge_err; struct u64_stats_sync sync; struct u64_stats_sync sync_compl; }; @@ -944,8 +945,10 @@ static inline bool is_ipv6_ext_hdr(struct sk_buff *skb) #define BE_ERROR_EEH 1 #define BE_ERROR_UE BIT(1) #define BE_ERROR_FW BIT(2) -#define BE_ERROR_HW (BE_ERROR_EEH | BE_ERROR_UE) -#define BE_ERROR_ANY (BE_ERROR_EEH | BE_ERROR_UE | BE_ERROR_FW) +#define BE_ERROR_TX BIT(3) +#define BE_ERROR_HW (BE_ERROR_EEH | BE_ERROR_UE | BE_ERROR_TX) +#define BE_ERROR_ANY (BE_ERROR_EEH | BE_ERROR_UE | BE_ERROR_FW | \ + BE_ERROR_TX) #define BE_CLEAR_ALL 0xFF static inline u8 be_check_error(struct be_adapter *adapter, u32 err_type) -- cgit v1.2.3