Netdev List
 help / color / mirror / Atom feed
From: Matthieu Baerts <matttbe@kernel.org>
To: Jiawen Wu <jiawenwu@trustnetic.com>, netdev@vger.kernel.org
Cc: Mengyuan Lou <mengyuanlou@net-swift.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Larysa Zaremba <larysa.zaremba@intel.com>,
	Fabio Baltieri <fabio.baltieri@gmail.com>
Subject: Re: [PATCH net v3 2/3] net: txgbe: distinguish module types by checking identifier
Date: Thu, 11 Jun 2026 14:57:08 +0200	[thread overview]
Message-ID: <42de7b55-4e06-4f71-9ac9-59f05430d802@kernel.org> (raw)
In-Reply-To: <20260608070842.36504-3-jiawenwu@trustnetic.com>

Hi Jiawen,

On 08/06/2026 09:08, Jiawen Wu wrote:
> Rework txgbe_identify_module() to validate module identifiers through
> explicit type checks instead of relying on transceiver_type heuristics.
> When using the SFP module, transceiver_type could be a random value,
> because it was read from an invalid register.
> 
> Fixes: 57d39faed4c9 ("net: txgbe: improve functions of AML 40G devices")
> Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> ---
>  drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c | 18 ++++++++----------
>  1 file changed, 8 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
> index a7e81f9e1be1..bdac654a2364 100644
> --- a/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
> +++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_aml.c
> @@ -357,18 +357,16 @@ int txgbe_identify_module(struct wx *wx)
>  	}
>  
>  	id = &buffer.id;
> -	if (id->identifier != TXGBE_SFF_IDENTIFIER_SFP &&
> -	    id->identifier != TXGBE_SFF_IDENTIFIER_QSFP &&
> -	    id->identifier != TXGBE_SFF_IDENTIFIER_QSFP_PLUS &&
> -	    id->identifier != TXGBE_SFF_IDENTIFIER_QSFP28) {
> -		wx_err(wx, "Invalid module\n");
> -		return -ENODEV;

FYI, we got a small conflict when merging 'net' in 'net-next' in the
MPTCP tree due to this patch applied in 'net':

  f2df54ddbfb0 ("net: txgbe: distinguish module types by checking
identifier")

and this one from 'net-next':

  f67aead16e85 ("net: txgbe: rework service event handling")

----- Generic Message -----
The best is to avoid conflicts between 'net' and 'net-next' trees but if
they cannot be avoided when preparing patches, a note about how to fix
them is much appreciated.

The conflict has been resolved on our side [1]. Please report any issues
linked to this conflict resolution as it might be used by others. If you
worked on the mentioned patches, don't hesitate to ACK this conflict
resolution.
---------------------------

Regarding this conflict, I took the version from net-next, which
includes the new return using -EINVAL instead of -ENODEV like above.

Rerere cache is available in [2].

Cheers,
Matt

1: https://github.com/multipath-tcp/mptcp_net-next/commit/a8d41e018cc6
2: https://github.com/multipath-tcp/mptcp-upstream-rr-cache/commit/88eeb

Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.


  reply	other threads:[~2026-06-11 12:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08  7:08 [PATCH net v3 0/3] net: txgbe: fix module identification Jiawen Wu
2026-06-08  7:08 ` [PATCH net v3 1/3] net: txgbe: initialize module info buffer Jiawen Wu
2026-06-08  7:08 ` [PATCH net v3 2/3] net: txgbe: distinguish module types by checking identifier Jiawen Wu
2026-06-11 12:57   ` Matthieu Baerts [this message]
2026-06-08  7:08 ` [PATCH net v3 3/3] net: txgbe: initialize PHY interface to 0 Jiawen Wu
2026-06-11  9:10 ` [PATCH net v3 0/3] net: txgbe: fix module identification 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=42de7b55-4e06-4f71-9ac9-59f05430d802@kernel.org \
    --to=matttbe@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=fabio.baltieri@gmail.com \
    --cc=horms@kernel.org \
    --cc=jiawenwu@trustnetic.com \
    --cc=kuba@kernel.org \
    --cc=larysa.zaremba@intel.com \
    --cc=mengyuanlou@net-swift.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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