DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Mingjin Ye <mingjinx.ye@intel.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>,
	Anatoly Burakov <anatoly.burakov@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>
Subject: Re: [PATCH] net/ixgbe: fix EEPROM read failure on copper media
Date: Wed, 1 Jul 2026 11:46:19 +0100	[thread overview]
Message-ID: <akTv-wISOVqvd8XD@bricha3-mobl1.ger.corp.intel.com> (raw)
In-Reply-To: <20260701090703.107264-1-mingjinx.ye@intel.com>

On Wed, Jul 01, 2026 at 09:07:03AM +0000, Mingjin Ye wrote:
> The ixgbe_get_module_info() and ixgbe_get_module_eeprom() functions
> attempt to read SFF EEPROM data for all port types. However, copper
> media ports do not have SFF EEPROMs, causing invalid I2C operations
> and generating error logs.
> 
> This patch adds a media type check at the beginning of both functions.
> If the media type is ixgbe_media_type_copper, return -ENOTSUP to
> safely skip the EEPROM read.
> 
> Fixes: b74d0cd43e37 ("net/ixgbe: add module EEPROM callbacks for ixgbe")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Mingjin Ye <mingjinx.ye@intel.com>
> ---
>  drivers/net/intel/ixgbe/ixgbe_ethdev.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/drivers/net/intel/ixgbe/ixgbe_ethdev.c b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
> index f9de95e4fc..44c29f0642 100644
> --- a/drivers/net/intel/ixgbe/ixgbe_ethdev.c
> +++ b/drivers/net/intel/ixgbe/ixgbe_ethdev.c
> @@ -7424,6 +7424,12 @@ ixgbe_get_module_info(struct rte_eth_dev *dev,
>  	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
>  		return -E_RTE_SECONDARY;
>  
> +	if (hw->phy.media_type == ixgbe_media_type_copper) {
> +		PMD_DRV_LOG(DEBUG, "Port %u is Base-T (copper), no SFF module info.",
> +				dev->data->port_id);
> +		return -ENOTSUP;
> +	}
> +
>  	/* Check whether we support SFF-8472 or not */
>  	status = hw->phy.ops.read_i2c_eeprom(hw,
>  					     IXGBE_SFF_SFF_8472_COMP,
> @@ -7477,6 +7483,12 @@ ixgbe_get_module_eeprom(struct rte_eth_dev *dev,
>  	if (rte_eal_process_type() != RTE_PROC_PRIMARY)
>  		return -E_RTE_SECONDARY;
>  
> +	if (hw->phy.media_type == ixgbe_media_type_copper) {
> +		PMD_DRV_LOG(DEBUG, "Port %u is Base-T (copper), cannot read module EEPROM.",
> +				dev->data->port_id);
> +		return -ENOTSUP;
> +	}
> +

Looks reasonable.

Acked-by: Bruce Richardson <bruce.richardson@intel.com>


  reply	other threads:[~2026-07-01 10:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  9:07 [PATCH] net/ixgbe: fix EEPROM read failure on copper media Mingjin Ye
2026-07-01 10:46 ` Bruce Richardson [this message]
2026-07-01 11:07   ` Bruce Richardson

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=akTv-wISOVqvd8XD@bricha3-mobl1.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=mingjinx.ye@intel.com \
    --cc=stable@dpdk.org \
    --cc=vladimir.medvedkin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox