Re: [PATCH net-next v6 1/2] net: sfp: apply I2C adapter quirks to limit block size
From: Maxime Chevallier
Date: Wed May 06 2026 - 03:34:45 EST
Hi Jonas,
On 05/05/2026 22:06, Jonas Jelonek wrote:
> The SFP driver assumes all I2C adapters support reading and writing the
> pre-defined block size SFP_EEPROM_BLOCK_SIZE of 16 bytes. This constant
> was probably chosen based on good guesses and known limitations of a
> range of I2C adapters and SFP modules.
>
> However, I2C adapters may even support less and usually need to specify
> this via I2C quirks. Theoretically, such an adapter may provide full
> functionality but only support a read and write length of e.g. 8 bytes.
> Currently, the SFP driver doesn't account for that.
>
> Add handling for I2C quirks in SFP I2C configuration taking the fields
> max_read_len and max_write_len in struct i2c_adapter_quirks into account
> to further limit the maximum block size if needed.
>
> Signed-off-by: Jonas Jelonek <jelonek.jonas@xxxxxxxxx>
Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>
Good to see this series moving forward, thank you :)
Maxime