From: Jakub Kicinski <kuba@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
pabeni@redhat.com, andrew+netdev@lunn.ch,
pavan.chebbi@broadcom.com, andrew.gospodarek@broadcom.com,
Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Subject: Re: [PATCH net-next 6/6] bnxt_en: Implement ethtool_ops -> get_link_ext_state()
Date: Tue, 6 Jan 2026 18:15:13 -0800 [thread overview]
Message-ID: <20260106181513.48e8f218@kernel.org> (raw)
In-Reply-To: <20260105215833.46125-7-michael.chan@broadcom.com>
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.
prev parent reply other threads:[~2026-01-07 2:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-05 21:58 [PATCH net-next 0/6] bnxt_en: Updates for net-next Michael Chan
2026-01-05 21:58 ` [PATCH net-next 1/6] bnxt_en: Update FW interface to 1.10.3.151 Michael Chan
2026-01-05 21:58 ` [PATCH net-next 2/6] bnxt_en: Add PTP .getcrosststamp() interface to get device/host times Michael Chan
2026-01-05 22:18 ` Vadim Fedorenko
2026-01-05 21:58 ` [PATCH net-next 3/6] bnxt_en: Add support for FEC bin histograms Michael Chan
2026-01-06 12:07 ` Vadim Fedorenko
2026-01-05 21:58 ` [PATCH net-next 4/6] bnxt_en: Defrag the NVRAM region when resizing UPDATE region fails Michael Chan
2026-01-07 2:19 ` Jakub Kicinski
2026-01-05 21:58 ` [PATCH net-next 5/6] bnxt_en: Use a larger RSS indirection table on P5_PLUS chips Michael Chan
2026-01-05 21:58 ` [PATCH net-next 6/6] bnxt_en: Implement ethtool_ops -> get_link_ext_state() Michael Chan
2026-01-07 2:15 ` Jakub Kicinski [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260106181513.48e8f218@kernel.org \
--to=kuba@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=andrew.gospodarek@broadcom.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kalesh-anakkur.purayil@broadcom.com \
--cc=michael.chan@broadcom.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavan.chebbi@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.