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] [day] [month] [year] [list]
Message-ID: <20260106181513.48e8f218@kernel.org>
Date: Tue, 6 Jan 2026 18:15:13 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Michael Chan <michael.chan@...adcom.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 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 6/6] bnxt_en: Implement ethtool_ops ->
 get_link_ext_state()

On Mon,  5 Jan 2026 13:58:33 -0800 Michael Chan wrote:
> +static char *bnxt_link_down_reason(struct bnxt_link_info *link_info)
> +{
> +	u8 reason = link_info->link_down_reason;
> +
> +	/* Multiple bits can be set, we report 1 bit only in order of
> +	 * priority.
> +	 */
> +	if (reason & PORT_PHY_QCFG_RESP_LINK_DOWN_REASON_RF)
> +		return "(Remote fault)";
> +	if (reason & PORT_PHY_QCFG_RESP_LINK_DOWN_REASON_OTP_SPEED_VIOLATION)
> +		return "(OTP Speed limit violation)";
> +	if (reason & PORT_PHY_QCFG_RESP_LINK_DOWN_REASON_CABLE_REMOVED)
> +		return "(Cable removed)";
> +	if (reason & PORT_PHY_QCFG_RESP_LINK_DOWN_REASON_MODULE_FAULT)
> +		return "(Module fault)";
> +	if (reason & PORT_PHY_QCFG_RESP_LINK_DOWN_REASON_BMC_REQUEST)
> +		return "(BMC request down)";
> +	if (reason & PORT_PHY_QCFG_RESP_LINK_DOWN_REASON_TX_LASER_DISABLED)
> +		return "(TX laser disabled)";
> +	return "";
> +};

spurious ;

> +static int bnxt_get_link_ext_state(struct net_device *dev,
> +				   struct ethtool_link_ext_state_info *info)
> +{
> +	struct bnxt *bp = netdev_priv(dev);
> +	u8 reason;
> +
> +	if (BNXT_LINK_IS_UP(bp))
> +		return -ENODATA;
> +
> +	reason = bp->link_info.link_down_reason;
> +	if (reason & PORT_PHY_QCFG_RESP_LINK_DOWN_REASON_CABLE_REMOVED) {
> +		info->link_ext_state = ETHTOOL_LINK_EXT_STATE_NO_CABLE;
> +		return 0;
> +	} else if (reason & PORT_PHY_QCFG_RESP_LINK_DOWN_REASON_MODULE_FAULT) {
> +		info->link_ext_state = ETHTOOL_LINK_EXT_STATE_MODULE;
> +		return 0;

Please extend the uAPI to add the missing codes. None of the strings
you're adding look very Broadcom specific to me. And there's a code 
for Remote Fault already.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ