Netdev List
 help / color / mirror / Atom feed
* [PATCH net v2] bnxt_en: Gate TPH enablement behind BNXT_SUPPORTS_QUEUE_API check
@ 2026-08-20 22:05 Thomas Walsh
  2026-08-21  4:20 ` Pavan Chebbi
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Walsh @ 2026-08-20 22:05 UTC (permalink / raw)
  To: Michael Chan, Pavan Chebbi, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni
  Cc: netdev, linux-kernel, Thomas Walsh, Michal Schmidt

In bnxt_request_irq(), pcie_enable_tph() is called unconditionally to
enable PCIe TPH when setting up interrupts.

If the NIC hardware or firmware capabilities do not support queue ops,
attempting to enable TPH during bnxt_request_irq() is unnecessary.

As a result a flood of "RX queue restart failed: err=-95"  messages is
seen upon boot.

Older NICs (pre-Thor / BCM57414) do not support TPH or queue management.
TPH requires queue management to restart the queue.  NICs that support
queue management (with updated FW) all support TPH.

Gate the call to pcie_enable_tph() and setting of bp->tph_mode
behind BNXT_SUPPORTS_QUEUE_API(bp) to ensure TPH is only initialized
on devices capable of supporting queue ops. This prevents a guaranteed
-EOPNOTSUPP error from occurring due to NULL operations.

Fixes: 1410c7416dc3 ("eth: bnxt: always set the queue mgmt ops")
Suggested-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Thomas Walsh <thwalsh@redhat.com>
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
---
v2:
 - Updated commit message to include context on hardware support 
   and added Michael Chan's Reviewed-by tag.
 - Rebased onto net/main.

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

diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 9377bf675981..abe24d749cc2 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -11946,9 +11946,11 @@ static int bnxt_request_irq(struct bnxt *bp)
 #endif
 
 	/* Enable TPH support as part of IRQ request */
-	rc = pcie_enable_tph(bp->pdev, PCI_TPH_ST_IV_MODE);
-	if (!rc)
-		bp->tph_mode = PCI_TPH_ST_IV_MODE;
+	if (BNXT_SUPPORTS_QUEUE_API(bp)) {
+		rc = pcie_enable_tph(bp->pdev, PCI_TPH_ST_IV_MODE);
+		if (!rc)
+			bp->tph_mode = PCI_TPH_ST_IV_MODE;
+	}
 
 	for (i = 0, j = 0; i < bp->cp_nr_rings; i++) {
 		struct cpumask *cpu_mask = bp->ring_cpu_mask[i];
-- 
2.55.0


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

* Re: [PATCH net v2] bnxt_en: Gate TPH enablement behind BNXT_SUPPORTS_QUEUE_API check
  2026-08-20 22:05 [PATCH net v2] bnxt_en: Gate TPH enablement behind BNXT_SUPPORTS_QUEUE_API check Thomas Walsh
@ 2026-08-21  4:20 ` Pavan Chebbi
  0 siblings, 0 replies; 2+ messages in thread
From: Pavan Chebbi @ 2026-08-21  4:20 UTC (permalink / raw)
  To: Thomas Walsh
  Cc: Michael Chan, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, netdev, linux-kernel, Michal Schmidt

[-- Attachment #1: Type: text/plain, Size: 1402 bytes --]

On Fri, Aug 21, 2026 at 3:36 AM Thomas Walsh <thwalsh@redhat.com> wrote:
>
> In bnxt_request_irq(), pcie_enable_tph() is called unconditionally to
> enable PCIe TPH when setting up interrupts.
>
> If the NIC hardware or firmware capabilities do not support queue ops,
> attempting to enable TPH during bnxt_request_irq() is unnecessary.
>
> As a result a flood of "RX queue restart failed: err=-95"  messages is
> seen upon boot.
>
> Older NICs (pre-Thor / BCM57414) do not support TPH or queue management.
> TPH requires queue management to restart the queue.  NICs that support
> queue management (with updated FW) all support TPH.
>
> Gate the call to pcie_enable_tph() and setting of bp->tph_mode
> behind BNXT_SUPPORTS_QUEUE_API(bp) to ensure TPH is only initialized
> on devices capable of supporting queue ops. This prevents a guaranteed
> -EOPNOTSUPP error from occurring due to NULL operations.
>
> Fixes: 1410c7416dc3 ("eth: bnxt: always set the queue mgmt ops")
> Suggested-by: Michal Schmidt <mschmidt@redhat.com>
> Signed-off-by: Thomas Walsh <thwalsh@redhat.com>
> Reviewed-by: Michael Chan <michael.chan@broadcom.com>
> ---
> v2:
>  - Updated commit message to include context on hardware support
>    and added Michael Chan's Reviewed-by tag.
>  - Rebased onto net/main.
>

OK with the consensus.
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5469 bytes --]

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

end of thread, other threads:[~2026-08-21  4:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 22:05 [PATCH net v2] bnxt_en: Gate TPH enablement behind BNXT_SUPPORTS_QUEUE_API check Thomas Walsh
2026-08-21  4:20 ` Pavan Chebbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox