Index | Thread | Search

From:
Alexander Bluhm <bluhm@openbsd.org>
Subject:
Re: bnxt: bcm5750x support
To:
Jonathan Matthew <jonathan@d14n.org>
Cc:
tech@openbsd.org, stsp@stsp.name
Date:
Wed, 14 Jan 2026 12:30:56 +0100

Download raw body.

Thread
On Tue, Jan 13, 2026 at 04:21:41PM +1000, Jonathan Matthew wrote:
> Here's the first piece I'd like to commit, moving the func reset
> and qportcfg operations around to suit the P5 setup process.
> 
> ok?

I have tested it, also with vlan and jumbo frames.  No regression.

bnxt0 at pci13 dev 0 function 0 "Broadcom BCM57412" rev 0x01: fw ver 214.4.91, msix, 8 queues, address 14:23:f2:a0:71:e0

bluhm

> Index: if_bnxt.c
> ===================================================================
> RCS file: /cvs/src/sys/dev/pci/if_bnxt.c,v
> diff -u -p -r1.62 if_bnxt.c
> --- if_bnxt.c	19 Nov 2025 07:28:52 -0000	1.62
> +++ if_bnxt.c	12 Jan 2026 06:54:56 -0000
> @@ -512,6 +512,11 @@ bnxt_attach(struct device *parent, struc
>  		goto free_resp;
>  	}
>  
> +	if (bnxt_hwrm_func_reset(sc) != 0) {
> +		printf(": reset failed\n");
> +		goto free_resp;
> +	}
> +
>  	if (bnxt_hwrm_nvm_get_dev_info(sc, NULL, NULL, NULL, NULL, NULL, NULL)
>  	    != 0) {
>  		printf(": failed to get nvram info\n");
> @@ -533,6 +538,11 @@ bnxt_attach(struct device *parent, struc
>  		goto free_resp;
>  	}
>  
> +	if (bnxt_hwrm_queue_qportcfg(sc) != 0) {
> +		printf(": failed to query port config\n");
> +		goto free_resp;
> +	}
> +
>  	/*
>  	 * devices advertise msi support, but there's no way to tell a
>  	 * completion queue to use msi mode, only legacy or msi-x.
> @@ -581,16 +591,6 @@ bnxt_attach(struct device *parent, struc
>  
>  	if (bnxt_hwrm_func_qcfg(sc) != 0) {
>  		printf("%s: failed to query function config\n", DEVNAME(sc));
> -		goto deintr;
> -	}
> -
> -	if (bnxt_hwrm_queue_qportcfg(sc) != 0) {
> -		printf("%s: failed to query port config\n", DEVNAME(sc));
> -		goto deintr;
> -	}
> -
> -	if (bnxt_hwrm_func_reset(sc) != 0) {
> -		printf("%s: reset failed\n", DEVNAME(sc));
>  		goto deintr;
>  	}
>  
> 
>