lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z2KLiSYjhQjboHMw@mev-dev.igk.intel.com>
Date: Wed, 18 Dec 2024 09:44:57 +0100
From: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
To: Michael Chan <michael.chan@...adcom.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
	kuba@...nel.org, pabeni@...hat.com, andrew+netdev@...n.ch,
	pavan.chebbi@...adcom.com, andrew.gospodarek@...adcom.com,
	Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
Subject: Re: [PATCH net-next v2 4/6] bnxt_en: Skip MAC loopback selftest if
 it is unsupported by FW

On Tue, Dec 17, 2024 at 10:26:18AM -0800, Michael Chan wrote:
> Call the new HWRM_PORT_MAC_QCAPS to check if mac loopback is
> supported.  Skip the MAC loopback ethtool self test if it is
> not supported.
> 
> Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@...adcom.com>
> Reviewed-by: Pavan Chebbi <pavan.chebbi@...adcom.com>
> Reviewed-by: Andy Gospodarek <andrew.gospodarek@...adcom.com>
> Signed-off-by: Michael Chan <michael.chan@...adcom.com>
> ---
> v2: Change bnxt_hwrm_mac_qcaps() to void
> Cc: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>
> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 24 +++++++++++++++++++
>  drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  5 ++++
>  .../net/ethernet/broadcom/bnxt/bnxt_ethtool.c | 11 +++++----
>  3 files changed, 36 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index c0728d5ff8bc..46edea75e062 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -11551,6 +11551,26 @@ static int bnxt_hwrm_phy_qcaps(struct bnxt *bp)
>  	return rc;
>  }
>  
> +static void bnxt_hwrm_mac_qcaps(struct bnxt *bp)
> +{
> +	struct hwrm_port_mac_qcaps_output *resp;
> +	struct hwrm_port_mac_qcaps_input *req;
> +	int rc;
> +
> +	if (bp->hwrm_spec_code < 0x10a03)
> +		return;
> +
> +	rc = hwrm_req_init(bp, req, HWRM_PORT_MAC_QCAPS);
> +	if (rc)
> +		return;
> +
> +	resp = hwrm_req_hold(bp, req);
> +	rc = hwrm_req_send_silent(bp, req);
> +	if (!rc)
> +		bp->mac_flags = resp->flags;
> +	hwrm_req_drop(bp, req);
> +}
> +
>  static bool bnxt_support_dropped(u16 advertising, u16 supported)
>  {
>  	u16 diff = advertising ^ supported;
> @@ -15679,6 +15699,10 @@ static int bnxt_probe_phy(struct bnxt *bp, bool fw_dflt)
>  		bp->dev->priv_flags |= IFF_SUPP_NOFCS;
>  	else
>  		bp->dev->priv_flags &= ~IFF_SUPP_NOFCS;
> +
> +	bp->mac_flags = 0;
> +	bnxt_hwrm_mac_qcaps(bp);
> +
>  	if (!fw_dflt)
>  		return 0;
>
Thanks for changing the return value
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@...ux.intel.com>

[...]
> -- 
> 2.30.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ