Subject: Re: [PATCH net-next v5] net: sfp: extend SMBus support

From: "Russell King (Oracle)" <[email-masked]>
Date: Fri, 16 Jan 2026 13:57:01 +0000

On Fri, Jan 16, 2026 at 11:31:05AM +0000, Jonas Jelonek wrote:
> +		max_block_size = SFP_EEPROM_BLOCK_SIZE;
> +	} else if (functionality & I2C_FUNC_SMBUS_BYTE_DATA) {

If we want to be fully flexible, then:

	} else if (functionality & (I2C_FUNC_SMBUS_BYTE_DATA |
				    I2C_FUNC_SMBUS_I2C_BLOCK)) {

since if we only have SMBus I2C block, then everything is fine.

However, I suggest asking I2C people whether it's possible to have a
SMBUS that supports I2C block and/or word access but not byte access.
Is there a heirarchy to the SMBus capabilities.

Also, is it possible for SMBus to support different read and write
capabilities (since there are separate bits for read and write of
each size.)

So, maybe it needs to be:

	} else if ((functionality & I2C_FUNC_SMBUS_BYTE_DATA) == I2C_FUNC_SMBUS_BYTE_DATA ||
		   (functionality & I2C_FUNC_SMBUS_I2C_BLOCK) == I2C_FUNC_SMBUS_I2C_BLOCK) {

to check that both read and write capabilities for each are set.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!