On Mon, 19 Dec 2022 19:20:10 +0100, Heiner Kallweit wrote: > Currently we touch SMBAUXCTL even if not needed. That's the case for block > commands that don't use block buffer mode, either because block buffer > mode isn't available or because it's not supported for the respective > command (e.g. I2C block transfer). Improve this by setting/resetting > SMBAUXCTL_E32B in i801_block_transaction_by_block() only. > > Small downside is that we know access SMBAUXCTL twice for transactions Typo: know -> now. > that use PEC and block buffer mode. But this should a rather rare case > and the impact is negligible. I agree, and the new way also makes things symmetric and thus more obviously correct. > Signed-off-by: Heiner Kallweit <hkallweit1@xxxxxxxxx> > --- > drivers/i2c/busses/i2c-i801.c | 21 ++++++++++++--------- > 1 file changed, 12 insertions(+), 9 deletions(-) > (...) Reviewed-by: Jean Delvare <jdelvare@xxxxxxx> One possible further improvement step, performance-wise, would be to store the original value of SMBAUXCTL so that we can skip the inb_p() at the end of the function. What do you think? -- Jean Delvare SUSE L3 Support