From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Andrew Lunn'" <andrew@lunn.ch>
Cc: "'Vadim Fedorenko'" <vadim.fedorenko@linux.dev>,
<netdev@vger.kernel.org>, "'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>,
"'Russell King'" <linux@armlinux.org.uk>,
"'Simon Horman'" <horms@kernel.org>,
"'Jacob Keller'" <jacob.e.keller@intel.com>,
"'Mengyuan Lou'" <mengyuanlou@net-swift.com>,
"'Vadim Fedorenko'" <vadim.fedorenko@linux.dev>,
<netdev@vger.kernel.org>, "'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>,
"'Russell King'" <linux@armlinux.org.uk>,
"'Simon Horman'" <horms@kernel.org>,
"'Jacob Keller'" <jacob.e.keller@intel.com>,
"'Mengyuan Lou'" <mengyuanlou@net-swift.com>
Subject: RE: [PATCH net-next 5/5] net: txgbe: support getting module EEPROM by page
Date: Mon, 17 Nov 2025 14:14:29 +0800 [thread overview]
Message-ID: <012801dc5789$6ea20440$4be60cc0$@trustnetic.com> (raw)
In-Reply-To: <f7d7ed12-0c52-4b82-80eb-948b77b0ddaf@lunn.ch>
On Fri, Nov 14, 2025 6:19 AM, Andrew Lunn wrote:
> > For 1-byte data, wx_host_interface_command() can be used to set 'return_data'
> > to true, then page->data = buffer->data. For other cases, I think it would be more
> > convenient to read directly from the mailbox registers.
>
> For 1-byte data, you need to careful where it is used. All the sensor
> values are u16 and you need to read a u16 otherwise you are not
> guaranteed to get consistent upper/lower bytes.
>
> So i would not recommend 1 byte read, unless you have an SFP module
> which is known to be broken, and only supports 1 byte reads.
Thanks for the reminder.
But when I use 'ethtool -m', .get_module_eeprom_by_page() is always
invoked multiple times, with 'page->length = 1' in the first time.
next prev parent reply other threads:[~2025-11-17 6:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-12 5:58 [PATCH net-next 0/5] TXGBE support more modules Jiawen Wu
2025-11-12 5:58 ` [PATCH net-next 1/5] net: txgbe: support CR modules for AML devices Jiawen Wu
2025-11-12 5:58 ` [PATCH net-next 2/5] net: txgbe: rename the SFP related Jiawen Wu
2025-11-12 5:58 ` [PATCH net-next 3/5] net: txgbe: improve functions of AML 40G devices Jiawen Wu
2025-11-12 5:58 ` [PATCH net-next 4/5] net: txgbe: delay to identify modules in .ndo_open Jiawen Wu
2025-11-12 5:58 ` [PATCH net-next 5/5] net: txgbe: support getting module EEPROM by page Jiawen Wu
2025-11-12 12:48 ` Vadim Fedorenko
2025-11-13 2:21 ` Jiawen Wu
2025-11-13 11:57 ` Vadim Fedorenko
2025-11-17 6:26 ` Jiawen Wu
2025-11-13 22:18 ` Andrew Lunn
2025-11-17 6:14 ` Jiawen Wu [this message]
2025-11-17 13:58 ` Andrew Lunn
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='012801dc5789$6ea20440$4be60cc0$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vadim.fedorenko@linux.dev \
/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;
as well as URLs for NNTP newsgroup(s).