FAILED: patch "[PATCH] bnxt_en: Fix incorrect multicast rx mask setting when not" failed to apply to 4.14-stable tree
[email protected]
maintainerThe patch below does not apply to the 4.14-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 8cdb15924252e27af16c4a8fe0fc606ce5fd04dc Mon Sep 17 00:00:00 2001
From: Pavan Chebbi <[email protected]>
Date: Sun, 20 Feb 2022 04:05:50 -0500
Subject: [PATCH] bnxt_en: Fix incorrect multicast rx mask setting when not
requested
We should setup multicast only when net_device flags explicitly has IFF_MULTICAST set. Otherwise we will incorrectly turn it on even when not asked. Fix it by only passing the multicast table to the firmware if IFF_MULTICAST is set.
drivers/net/ethernet/broadcom/bnxt/bnxt.c +8 -5
@@ -4747,8 +4747,10 @@ static int bnxt_hwrm_cfa_l2_set_rx_mask(struct bnxt *bp, u16 vnic_id)return rc; req->vnic_id =cpu_to_le32 (vnic->fw_vnic_id); - req->num_mc_entries =cpu_to_le32 (vnic->mc_list_count); - req->mc_tbl_addr =cpu_to_le64 (vnic->mc_list_mapping); +if (vnic->rx_mask &CFA_L2_SET_RX_MASK_REQ_MASK_MCAST ) { + req->num_mc_entries =cpu_to_le32 (vnic->mc_list_count); + req->mc_tbl_addr =cpu_to_le64 (vnic->mc_list_mapping); + } req->mask =cpu_to_le32 (vnic->rx_mask);return hwrm_req_send_silent (bp, req); }
@@ -8651,7 +8653,7 @@ static int bnxt_init_chip(struct bnxt *bp, bool irq_re_init)if (bp->dev->flags &IFF_ALLMULTI ) { vnic->rx_mask |=CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST ; vnic->mc_list_count =0 ; - }else { + }else if (bp->dev->flags &IFF_MULTICAST ) {u32 mask =0 ;bnxt_mc_list_updated (bp, &mask);
@@ -10779,7 +10781,7 @@ static void bnxt_set_rx_mode(struct net_device *dev)if (dev->flags &IFF_ALLMULTI ) { mask |=CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST ; vnic->mc_list_count =0 ; - }else { + }else if (dev->flags &IFF_MULTICAST ) { mc_update =bnxt_mc_list_updated (bp, &mask); }
@@ -10856,9 +10858,10 @@ static int bnxt_cfg_rx_mode(struct bnxt *bp) !bnxt_promisc_ok(bp)) vnic->rx_mask &= ~CFA_L2_SET_RX_MASK_REQ_MASK_PROMISCUOUS ; rc =bnxt_hwrm_cfa_l2_set_rx_mask (bp,0 ); -if (rc && vnic->mc_list_count) { +if (rc && (vnic->rx_mask &CFA_L2_SET_RX_MASK_REQ_MASK_MCAST )) {netdev_info (bp->dev,"Failed setting MC filters rc: %d, turning on ALL_MCAST mode\n" , rc); + vnic->rx_mask &= ~CFA_L2_SET_RX_MASK_REQ_MASK_MCAST ; vnic->rx_mask |=CFA_L2_SET_RX_MASK_REQ_MASK_ALL_MCAST ; vnic->mc_list_count =0 ; rc =bnxt_hwrm_cfa_l2_set_rx_mask (bp,0 );