All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Tony Nguyen <anthony.l.nguyen@intel.com>
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
	andrew+netdev@lunn.ch, netdev@vger.kernel.org,
	Birger Koblitz <mail@birger-koblitz.de>,
	Andrew Lunn <andrew@lunn.ch>, Paul Menzel <pmenzel@molgen.mpg.de>,
	Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
	Rinitha S <sx.rinitha@intel.com>
Subject: Re: [PATCH net-next 03/11] ixgbe: Add 10G-BX support
Date: Wed, 26 Nov 2025 15:32:45 -0800	[thread overview]
Message-ID: <20251126153245.66281590@kernel.org> (raw)
In-Reply-To: <20251125223632.1857532-4-anthony.l.nguyen@intel.com>



> @@ -1678,6 +1680,31 @@ int ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
>  			else
>  				hw->phy.sfp_type =
>  					ixgbe_sfp_type_1g_bx_core1;
> +		/* Support Ethernet 10G-BX, checking the Bit Rate
> +		 * Nominal Value as per SFF-8472 to be 12.5 Gb/s (67h) and
> +		 * Single Mode fibre with at least 1km link length
> +		 */
> +		} else if ((!comp_codes_10g) && (bitrate_nominal == 0x67) &&
> +			   (!(cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)) &&
> +			   (!(cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE))) {
> +			status = hw->phy.ops.read_i2c_eeprom(hw,
> +					    IXGBE_SFF_SM_LENGTH_KM,
> +					    &sm_length_km);
> +			if (status != 0)
> +				goto err_read_i2c_eeprom;
> +			status = hw->phy.ops.read_i2c_eeprom(hw,
> +					    IXGBE_SFF_SM_LENGTH_100M,
> +					    &sm_length_100m);
> +			if (status != 0)
> +				goto err_read_i2c_eeprom;
> +			if (sm_length_km > 0 || sm_length_100m >= 10) {
> +				if (hw->bus.lan_id == 0)
> +					hw->phy.sfp_type =
> +						ixgbe_sfp_type_10g_bx_core0;
> +				else
> +					hw->phy.sfp_type =
> +						ixgbe_sfp_type_10g_bx_core1;
> +			}
                        ^^^^

Claude says:

In ixgbe_identify_sfp_module_generic(), what happens when a module has
the 10G-BX characteristics (empty comp_codes_10g, bitrate 0x67, fiber
mode) but the link length check fails (both sm_length values < 1km)?

The outer else-if condition matches, so we skip the final else clause
that sets sfp_type to unknown. But the inner if condition fails, so we
don't set the 10g_bx type either. This leaves hw->phy.sfp_type
unchanged from whatever value it had previously.

All other branches in this if-else chain explicitly set sfp_type, but
this path only conditionally sets it. Should there be an else clause
after the inner if to set sfp_type = ixgbe_sfp_type_unknown when the
link length requirement isn't met?

>  		} else {
>  			hw->phy.sfp_type = ixgbe_sfp_type_unknown;
>  		}

  reply	other threads:[~2025-11-26 23:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 22:36 [PATCH net-next 00/11][pull request] Intel Wired LAN Driver Updates 2025-11-25 (ice, idpf, iavf, ixgbe, ixgbevf, e1000e) Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 01/11] ice: add support for unmanaged DPLL on E830 NIC Tony Nguyen
2025-11-26 23:30   ` Jakub Kicinski
2025-11-25 22:36 ` [PATCH net-next 02/11] ice: unify PHY FW loading status handler for E800 devices Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 03/11] ixgbe: Add 10G-BX support Tony Nguyen
2025-11-26 23:32   ` Jakub Kicinski [this message]
2025-11-27  6:33     ` Birger Koblitz
2025-11-27 16:07       ` Jakub Kicinski
2025-11-27 18:48         ` Birger Koblitz
2025-12-01 22:40           ` Tony Nguyen
2025-12-02  5:58             ` Birger Koblitz
2025-11-25 22:36 ` [PATCH net-next 04/11] ixgbevf: ixgbevf_q_vector clean up Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 05/11] idpf: convert vport state to bitmap Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 06/11] e1000e: Remove unneeded checks Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 07/11] ixgbe: avoid redundant call to ixgbe_non_sfp_link_config() Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 08/11] idpf: use desc_ring when checking completion queue DMA allocation Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 09/11] idpf: correct queue index in Rx allocation error messages Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 10/11] ice: fix comment typo and correct module format string Tony Nguyen
2025-11-25 22:36 ` [PATCH net-next 11/11] iavf: clarify VLAN add/delete log messages and lower log level Tony Nguyen
2025-11-28  2:38 ` [PATCH net-next 00/11][pull request] Intel Wired LAN Driver Updates 2025-11-25 (ice, idpf, iavf, ixgbe, ixgbevf, e1000e) Jakub Kicinski
2025-12-01 17:03   ` Tony Nguyen
2025-11-28  2:40 ` patchwork-bot+netdevbpf

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=20251126153245.66281590@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksandr.loktionov@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=mail@birger-koblitz.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pmenzel@molgen.mpg.de \
    --cc=sx.rinitha@intel.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.