Subject: Re: [PATCH net-next 4/9] bnxt_en: Deprecate support for legacy INTX mode

From: Simon Horman <[email-masked]>
Date: Mon, 15 Jul 2024 10:28:02 +0100

On Sat, Jul 13, 2024 at 04:43:34PM -0700, Michael Chan wrote:
> Firmware has deprecated support for legacy INTX in 2022 and INTX hasn't
> been tested for many years before that.  If MSIX capability is not
> found in probe, abort.
> 
> Reviewed-by: Hongguang Gao <[email-masked]>
> Reviewed-by: Kalesh AP <[email-masked]>
> Reviewed-by: Somnath Kotur <[email-masked]>
> Signed-off-by: Michael Chan <[email-masked]>

Hi Hongguang Gao, all,

The minor problem flagged below not withstanding,

Reviewed-by: Simon Horman <[email-masked]>

> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c

...

> @@ -15743,8 +15714,10 @@ static int bnxt_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	if (BNXT_PF(bp))
>  		SET_NETDEV_DEVLINK_PORT(dev, &bp->dl_port);
>  
> -	if (pdev->msix_cap)
> -		bp->flags |= BNXT_FLAG_MSIX_CAP;
> +	if (!pdev->msix_cap) {
> +		dev_err(&pdev->dev, "MSIX capability not found, aborting\n");
> +		return -ENODEV;
> +	}

Given where we are in the release cycle, perhaps this can be addressed
as a follow-up. But it appears that the above leaks dev.

Flagged by Smatch

>  
>  	rc = bnxt_init_board(pdev, dev);
>  	if (rc < 0)

...