Subject: RE: [PATCH net-next 5/5] net: txgbe: support getting module EEPROM by page

From: Jiawen Wu <[email-masked]>
Date: Mon, 17 Nov 2025 14:14:29 +0800

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.