RFC Increase SMBus max block size to 255
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | i2c: core: Allow 255 byte transfers for SMBus 3.xdrivers/ include/ include/ | +30 | 0 replies | |
| 2/3 | i2c: dev: Handle 255 byte blocks for i2c ioctldrivers/ include/ include/ | +82 | 0 replies | |
| 3/3 | i2c: aspeed: allow 255 byte block transfersdrivers/ | +3 | 1 reply |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Brendan Higgins |
|---|---|
| 1/3 | |
| 2/3 | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 0/3] Increase SMBus max block size to 255
This patch series increases the SMBus max block size from 32 to 255 as per the SMBus 3.0 specification.
Userspace remains backwards compatible with the current 32 byte block for the I2C_SMBUS ioctl, and the block size limit remains for I2C_RDWR ioctl with I2C_M_RECV_LEN.
It is separated into patches 1 & 2 though the userspace API isn't correct with only the first patch - maybe they should be squashed. The stack buffers in i2c_smbus_xfer_emulated() increase from ~70 bytes to ~500 bytes - I'm not sure if that is a problem.
I have tested with the Aspeed I2C controller, other drivers can add the functionality as needed. For most emulated drivers it looks like minimal changes are required.
This is required for MCTP I2C transport which has a 64 byte baseline packet size.
Cheers,
Matt
Matt Johnston (3):
i2c: core: Allow 255 byte transfers for SMBus 3.x
i2c: dev: Handle 255 byte blocks for i2c ioctl
i2c: aspeed: allow 255 byte block transfers
drivers/i2c/busses/i2c-aspeed.c | 5 +- drivers/i2c/i2c-core-smbus.c | 20 ++++--- drivers/i2c/i2c-dev.c | 92 ++++++++++++++++++++++++++++----- include/linux/i2c.h | 13 +++++ include/uapi/linux/i2c-dev.h | 2 + include/uapi/linux/i2c.h | 7 ++- 6 files changed, 115 insertions(+), 24 deletions(-)
Signature · 1 line
2.30.2