[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <970ef9b1-609b-4137-a76f-315c99fbf112@lunn.ch>
Date: Fri, 6 Sep 2024 17:36:06 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Danielle Ratson <danieller@...dia.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, yuehaibing@...wei.com,
linux-kernel@...r.kernel.org, petrm@...dia.com
Subject: Re: [PATCH net-next 1/2] net: ethtool: Add new parameters and a
function to support EPL
> +/* For accessing the EPL field on page 9Fh, the allowable length extension is
> + * min(i, 255) byte octets where i specifies the allowable additional number of
> + * byte octets in a READ or a WRITE.
> + */
> +u32 ethtool_cmis_get_max_epl_size(u8 num_of_byte_octs)
> +{
> + return 8 * (1 + min_t(u8, num_of_byte_octs, 255));
> +}
Does this get mapped to a 255 byte I2C bus transfer?
https://elixir.bootlin.com/linux/v6.11-rc6/source/drivers/net/phy/sfp.c#L218
/* SFP_EEPROM_BLOCK_SIZE is the size of data chunk to read the EEPROM
* at a time. Some SFP modules and also some Linux I2C drivers do not like
* reads longer than 16 bytes.
*/
#define SFP_EEPROM_BLOCK_SIZE 16
If an SMBUS is being used, rather than I2C, there is a hard limit of
32 bytes in a message transfer.
I've not looked in details at these patches, but maybe you need a
mechanism to ask the hardware or I2C driver what it can actually do?
Is it possible to say LPL is the only choice?
Andrew
Powered by blists - more mailing lists