OSDN Git Service

bnxt_en: Do not include ETH_FCS_LEN in the max packet length sent to fw.
authorVasundhara Volam <vasundhara-v.volam@broadcom.com>
Mon, 4 May 2020 08:50:30 +0000 (04:50 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 May 2020 17:44:10 +0000 (10:44 -0700)
The firmware does not expect the CRC to be included in the length
passed from the driver.  The firmware always configures the chip
to strip out the CRC.

Signed-off-by: Vasundhara Volam <vasundhara-v.volam@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_sriov.c

index 0cf41a1..5919f72 100644 (file)
@@ -5045,8 +5045,7 @@ int bnxt_hwrm_vnic_cfg(struct bnxt *bp, u16 vnic_id)
        req.dflt_ring_grp = cpu_to_le16(bp->grp_info[grp_idx].fw_grp_id);
        req.lb_rule = cpu_to_le16(0xffff);
 vnic_mru:
-       req.mru = cpu_to_le16(bp->dev->mtu + ETH_HLEN + ETH_FCS_LEN +
-                             VLAN_HLEN);
+       req.mru = cpu_to_le16(bp->dev->mtu + ETH_HLEN + VLAN_HLEN);
 
        req.vnic_id = cpu_to_le16(vnic->fw_vnic_id);
 #ifdef CONFIG_BNXT_SRIOV
index 6ea3df6..c883e88 100644 (file)
@@ -651,7 +651,7 @@ static int bnxt_hwrm_func_cfg(struct bnxt *bp, int num_vfs)
                                  FUNC_CFG_REQ_ENABLES_NUM_VNICS |
                                  FUNC_CFG_REQ_ENABLES_NUM_HW_RING_GRPS);
 
-       mtu = bp->dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
+       mtu = bp->dev->mtu + ETH_HLEN + VLAN_HLEN;
        req.mru = cpu_to_le16(mtu);
        req.mtu = cpu_to_le16(mtu);