Re: [PATCH net] bnxt_en: Gate TPH enablement behind BNXT_SUPPORTS_QUEUE_API check

From: Pavan Chebbi

Date: Wed Aug 19 2026 - 05:51:08 EST


On Tue, Aug 18, 2026 at 7:46 PM Thomas Walsh <thwalsh@xxxxxxxxxx> 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.
>
> 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@xxxxxxxxxx>
> Signed-off-by: Thomas Walsh <thwalsh@xxxxxxxxxx>
> ---
> 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 1e4944f3e606..9a2bbfa38f76 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -11920,9 +11920,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)) {

IMO we should not gate pcie_enable_tph() on BNXT_SUPPORTS_QUEUE_API,
since TPH's initial steering-tag placement is valid on its own and
re-steering may never be needed in some cases?
So in these cases it simply disables the feature.

The TPH code has changed recently. You will need to rebase so see if
you can bail out from the newly introduced bnxt_tph_update() function
if queue management is not supported.
I feel that may be a better solution..

> + 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++) {
> int map_idx = bnxt_cp_num_to_irq_num(bp, i);
> --
> 2.55.0
>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature