Merge branch ‘bnxt_en-Bug-fixes’ [Linux 5.2]

Merge branch ‘bnxt_en-Bug-fixes’ [Linux 5.2]

This Linux kernel change "Merge branch ‘bnxt_en-Bug-fixes’" is included in the Linux 5.2 release. This change is authored by David S. Miller <davem [at] davemloft.net> on Wed May 22 18:02:14 2019 -0700. The commit for this change in Linux stable tree is db51a73 (patch). Other info about this change: Merge: 31680ac 2e9217d

Merge branch 'bnxt_en-Bug-fixes'

Michael Chan says:

===================
bnxt_en: Bug fixes.

There are 4 driver fixes in this series:

1. Fix RX buffer leak during OOM condition.
2. Call pci_disable_msix() under correct conditions to prevent hitting BUG.
3. Reduce unneeded mmeory allocation in kdump kernel to prevent OOM.
4. Don't read device serial number on VFs because it is not supported.

Please queue #1, #2, #3 for -stable as well.  Thanks.
===================

Signed-off-by: David S. Miller <[email protected]>

There is no are 0 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 79812da..f758b2e 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -10725,11 +10725,12 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        goto init_err_pci_clean;
    }

-   /* Read the adapter's DSN to use as the eswitch switch_id */
-   rc = bnxt_pcie_dsn_get(bp, bp->switch_id);
-   if (rc)
-       goto init_err_pci_clean;
-
+   if (BNXT_PF(bp)) {
+       /* Read the adapter's DSN to use as the eswitch switch_id */
+       rc = bnxt_pcie_dsn_get(bp, bp->switch_id);
+       if (rc)
+           goto init_err_pci_clean;
+   }
    bnxt_hwrm_func_qcfg(bp);
    bnxt_hwrm_vnic_qcaps(bp);
    bnxt_hwrm_port_led_qcaps(bp);

Leave a Reply

Your email address will not be published. Required fields are marked *