netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/3] bnxt_en: Bug fixes
@ 2021-06-18  6:07 Michael Chan
  2021-06-18  6:07 ` [PATCH net 1/3] bnxt_en: Rediscover PHY capabilities after firmware reset Michael Chan
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Michael Chan @ 2021-06-18  6:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, gospo

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.

Michael Chan (1):
  bnxt_en: Rediscover PHY capabilities after firmware reset

Rukhsana Ansari (1):
  bnxt_en: Fix TQM fastpath ring backing store computation

Somnath Kotur (1):
  bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path

 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
2.18.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH net 1/3] bnxt_en: Rediscover PHY capabilities after firmware reset
  2021-06-18  6:07 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
@ 2021-06-18  6:07 ` Michael Chan
  2021-06-18  6:07 ` [PATCH net 2/3] bnxt_en: Fix TQM fastpath ring backing store computation Michael Chan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Chan @ 2021-06-18  6:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, gospo

There is a missing bnxt_probe_phy() call in bnxt_fw_init_one() to
rediscover the PHY capabilities after a firmware reset.  This can cause
some PHY related functionalities to fail after a firmware reset.  For
example, in multi-host, the ability for any host to configure the PHY
settings may be lost after a firmware reset.

Fixes: ec5d31e3c15d ("bnxt_en: Handle firmware reset status during IF_UP.")
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index fcc729d52b17..3685db6dc93d 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -11750,6 +11750,8 @@ static void bnxt_fw_init_one_p3(struct bnxt *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)
 {
 	int rc;
@@ -11764,6 +11766,9 @@ static int bnxt_fw_init_one(struct bnxt *bp)
 		netdev_err(bp->dev, "Firmware init phase 2 failed\n");
 		return rc;
 	}
+	rc = bnxt_probe_phy(bp, false);
+	if (rc)
+		return rc;
 	rc = bnxt_approve_mac(bp, bp->dev->dev_addr, false);
 	if (rc)
 		return rc;
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 2/3] bnxt_en: Fix TQM fastpath ring backing store computation
  2021-06-18  6:07 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
  2021-06-18  6:07 ` [PATCH net 1/3] bnxt_en: Rediscover PHY capabilities after firmware reset Michael Chan
@ 2021-06-18  6:07 ` Michael Chan
  2021-06-18  6:07 ` [PATCH net 3/3] bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path Michael Chan
  2021-06-18 19:10 ` [PATCH net 0/3] bnxt_en: Bug fixes patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Chan @ 2021-06-18  6:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, gospo

From: Rukhsana Ansari <rukhsana.ansari@broadcom.com>

TQM fastpath ring needs to be sized to store both the requester
and responder side of RoCE QPs in TQM for supporting bi-directional
tests.  Fix bnxt_alloc_ctx_mem() to multiply the RoCE QPs by a factor of
2 when computing the number of entries for TQM fastpath ring.  This
fixes an RX pipeline stall issue when running bi-directional max
RoCE QP tests.

Fixes: c7dd7ab4b204 ("bnxt_en: Improve TQM ring context memory sizing formulas.")
Signed-off-by: Rukhsana Ansari <rukhsana.ansari@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 3685db6dc93d..c913cb1f2a72 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -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 +
 		     2 * (extra_qps + ctx->qp_min_qp1_entries) + min;
 	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 = clamp_t(u32, entries, min, ctx->tqm_max_entries_per_ring);
 	for (i = 0; i < ctx->tqm_fp_rings_count + 1; i++) {
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH net 3/3] bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path
  2021-06-18  6:07 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
  2021-06-18  6:07 ` [PATCH net 1/3] bnxt_en: Rediscover PHY capabilities after firmware reset Michael Chan
  2021-06-18  6:07 ` [PATCH net 2/3] bnxt_en: Fix TQM fastpath ring backing store computation Michael Chan
@ 2021-06-18  6:07 ` Michael Chan
  2021-06-18 19:10 ` [PATCH net 0/3] bnxt_en: Bug fixes patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: Michael Chan @ 2021-06-18  6:07 UTC (permalink / raw)
  To: davem; +Cc: netdev, kuba, gospo

From: Somnath Kotur <somnath.kotur@broadcom.com>

bnxt_ethtool_init() may have allocated some memory and we need to
call bnxt_ethtool_free() to properly unwind if bnxt_init_one()
fails.

Fixes: 7c3809181468 ("bnxt_en: Refactor bnxt_init_one() and turn on TPA support on 57500 chips.")
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
---
 drivers/net/ethernet/broadcom/bnxt/bnxt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index c913cb1f2a72..aef3fccc27a9 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -13160,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_free_hwrm_short_cmd_req(bp);
 	bnxt_free_hwrm_resources(bp);
+	bnxt_ethtool_free(bp);
 	kfree(bp->fw_health);
 	bp->fw_health = NULL;
 	bnxt_cleanup_pci(bp);
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH net 0/3] bnxt_en: Bug fixes
  2021-06-18  6:07 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
                   ` (2 preceding siblings ...)
  2021-06-18  6:07 ` [PATCH net 3/3] bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path Michael Chan
@ 2021-06-18 19:10 ` patchwork-bot+netdevbpf
  3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-18 19:10 UTC (permalink / raw)
  To: Michael Chan; +Cc: davem, netdev, kuba, gospo

Hello:

This series was applied to netdev/net.git (refs/heads/master):

On Fri, 18 Jun 2021 02:07:24 -0400 you wrote:
> 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.
> 
> Michael Chan (1):
>   bnxt_en: Rediscover PHY capabilities after firmware reset
> 
> [...]

Here is the summary with links:
  - [net,1/3] bnxt_en: Rediscover PHY capabilities after firmware reset
    https://git.kernel.org/netdev/net/c/0afd6a4e8028
  - [net,2/3] bnxt_en: Fix TQM fastpath ring backing store computation
    https://git.kernel.org/netdev/net/c/c12e1643d273
  - [net,3/3] bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path
    https://git.kernel.org/netdev/net/c/03400aaa69f9

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-06-18 19:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18  6:07 [PATCH net 0/3] bnxt_en: Bug fixes Michael Chan
2021-06-18  6:07 ` [PATCH net 1/3] bnxt_en: Rediscover PHY capabilities after firmware reset Michael Chan
2021-06-18  6:07 ` [PATCH net 2/3] bnxt_en: Fix TQM fastpath ring backing store computation Michael Chan
2021-06-18  6:07 ` [PATCH net 3/3] bnxt_en: Call bnxt_ethtool_free() in bnxt_init_one() error path Michael Chan
2021-06-18 19:10 ` [PATCH net 0/3] bnxt_en: Bug fixes patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).