Commit b6a258c1 authored by David S. Miller's avatar David S. Miller

Merge branch 'bnxt_en-fixes'

Michael Chan says:

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

This patchset includes 3 small bug fixes to reinitialize PHY capabilities
after firmware reset, setup the chip's internal TQM fastpath ring
backing memory properly for RoCE traffic, and to free ethtool related
memory if driver probe fails.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 39eb0281 03400aaa
...@@ -7308,7 +7308,7 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp) ...@@ -7308,7 +7308,7 @@ static int bnxt_alloc_ctx_mem(struct bnxt *bp)
entries_sp = ctx->vnic_max_vnic_entries + ctx->qp_max_l2_entries + entries_sp = ctx->vnic_max_vnic_entries + ctx->qp_max_l2_entries +
2 * (extra_qps + ctx->qp_min_qp1_entries) + min; 2 * (extra_qps + ctx->qp_min_qp1_entries) + min;
entries_sp = roundup(entries_sp, ctx->tqm_entries_multiple); entries_sp = roundup(entries_sp, ctx->tqm_entries_multiple);
entries = ctx->qp_max_l2_entries + extra_qps + ctx->qp_min_qp1_entries; entries = ctx->qp_max_l2_entries + 2 * (extra_qps + ctx->qp_min_qp1_entries);
entries = roundup(entries, ctx->tqm_entries_multiple); entries = roundup(entries, ctx->tqm_entries_multiple);
entries = clamp_t(u32, entries, min, ctx->tqm_max_entries_per_ring); entries = clamp_t(u32, entries, min, ctx->tqm_max_entries_per_ring);
for (i = 0; i < ctx->tqm_fp_rings_count + 1; i++) { for (i = 0; i < ctx->tqm_fp_rings_count + 1; i++) {
...@@ -11750,6 +11750,8 @@ static void bnxt_fw_init_one_p3(struct bnxt *bp) ...@@ -11750,6 +11750,8 @@ static void bnxt_fw_init_one_p3(struct bnxt *bp)
bnxt_hwrm_coal_params_qcaps(bp); bnxt_hwrm_coal_params_qcaps(bp);
} }
static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt);
static int bnxt_fw_init_one(struct bnxt *bp) static int bnxt_fw_init_one(struct bnxt *bp)
{ {
int rc; int rc;
...@@ -11764,6 +11766,9 @@ static int bnxt_fw_init_one(struct bnxt *bp) ...@@ -11764,6 +11766,9 @@ static int bnxt_fw_init_one(struct bnxt *bp)
netdev_err(bp->dev, "Firmware init phase 2 failed\n"); netdev_err(bp->dev, "Firmware init phase 2 failed\n");
return rc; return rc;
} }
rc = bnxt_probe_phy(bp, false);
if (rc)
return rc;
rc = bnxt_approve_mac(bp, bp->dev->dev_addr, false); rc = bnxt_approve_mac(bp, bp->dev->dev_addr, false);
if (rc) if (rc)
return rc; return rc;
...@@ -13155,6 +13160,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -13155,6 +13160,7 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
bnxt_hwrm_func_drv_unrgtr(bp); bnxt_hwrm_func_drv_unrgtr(bp);
bnxt_free_hwrm_short_cmd_req(bp); bnxt_free_hwrm_short_cmd_req(bp);
bnxt_free_hwrm_resources(bp); bnxt_free_hwrm_resources(bp);
bnxt_ethtool_free(bp);
kfree(bp->fw_health); kfree(bp->fw_health);
bp->fw_health = NULL; bp->fw_health = NULL;
bnxt_cleanup_pci(bp); bnxt_cleanup_pci(bp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment