Re: [PATCH 3/8] hw/i2c: smbus: increase MAX_DATA_LEN

Peter Maydell <[email protected]> Thu, 30 Jul 2026 13:29:26 +0100
Newsgroups org.nongnu.qemu-arm,org.nongnu.qemu-devel
Message-ID <CAFEAcA_RjDnLufCgRxFhbPQv9SrfLxC8RvY5-SKzVWpJ17P7Gw@mail.gmail.com>
On Thu, 30 Jul 2026 at 00:13, Titus Rwantare <[email protected]> wrote:
>
> The 32 byte payload was raised to 255 for block reads in the SMBus 3.0
> specification. SMBus does not provide a way for devices to declare which
> version of the spec they are designed to so we must allow newer devices
> to return as much data as they allow.
>
> vsmstate_smbus_extended_data is added to avoid breaking migration.
>
> Specification: https://smbus.org/specs/SMBus_3_3_20240512.pdf
>
> > 6.5.7 Block Write/Read
> The Block Write begins with a slave address and a write condition. After =
the command code the host issues a byte count which describes how many more=
 bytes will follow in the message. If a slave has 20 bytes to send, the byt=
e count field will have the value 20 (14h), followed by the 20 bytes of dat=
a. The byte count does not include the PEC byte. The byte count may be 0. A=
 Block Read or Block Write is allowed to transfer a maximum of 255 data byt=
es.

You could line wrap this quote so it isn't one super long line.

Otherwise
Reviewed-by: Peter Maydell <[email protected]>

thanks
-- PMM