[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f7d7ed12-0c52-4b82-80eb-948b77b0ddaf@lunn.ch>
Date: Thu, 13 Nov 2025 23:18:52 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: 'Vadim Fedorenko' <vadim.fedorenko@...ux.dev>, netdev@...r.kernel.org,
'Andrew Lunn' <andrew+netdev@...n.ch>,
"'David S. Miller'" <davem@...emloft.net>,
'Eric Dumazet' <edumazet@...gle.com>,
'Jakub Kicinski' <kuba@...nel.org>,
'Paolo Abeni' <pabeni@...hat.com>,
'Russell King' <linux@...linux.org.uk>,
'Simon Horman' <horms@...nel.org>,
'Jacob Keller' <jacob.e.keller@...el.com>,
'Mengyuan Lou' <mengyuanlou@...-swift.com>
Subject: Re: [PATCH net-next 5/5] net: txgbe: support getting module EEPROM
by page
> 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.
Andrew
Powered by blists - more mailing lists