Skip to contentSkip to conversation

PMBus and SMBUS_BLOCK with "extended" lenght

DISCUSSION Benjamin Herrenschmidt 2 participants 4 messages Mar 31, 2017 – Apr 19, 2017 I2C subsystem host drivers

lore
Share & tools
lore
#0 lore raw

Hi folks !

Did anybody give thoughts to how we could support "smbus" block transfers with a size up to 0xff ? This is an extension of smbus that part of the PMbus protocol spec.

Our current code has a lot of places where I2C_SMBUS_BLOCK_MAX is hard wired. Including down in almost all drivers.

So it would have to be an evolutionary process.

I was thinking a message flag along with a functionality bit maybe ?

Cheers,
Ben.

#1 lore raw

Hi,

Quoted 3 lines

Did anybody give thoughts to how we could support "smbus" block transfers with a size up to 0xff ? This is an extension of smbus that part of the PMbus protocol spec.

For completeness, SMBus Spec V3 (released 2015) increased the allowed transfer size to 255 as well.

Quoted 8 lines

Our current code has a lot of places where I2C_SMBUS_BLOCK_MAX is hard wired. Including down in almost all drivers.

So it would have to be an evolutionary process.

I was thinking a message flag along with a functionality bit maybe ?

I have never really scratched my head about this issue yet and don't know of any on-going activity. It is notable, though, that we export I2C_SMBUS_BLOCK_MAX to userspace, too.

Regards,

Wolfram

#2 lore raw
Quoted 13 lines · Wolfram Sang

Hi,

Quoted 3 lines

Did anybody give thoughts to how we could support "smbus" block transfers with a size up to 0xff ? This is an extension of smbus that part of the PMbus protocol spec.

For completeness, SMBus Spec V3 (released 2015) increased the allowed transfer size to 255 as well.

Quoted 4 lines

Our current code has a lot of places where I2C_SMBUS_BLOCK_MAX is hard wired. Including down in almost all drivers.

Quoted 8 lines
Quoted 4 lines

So it would have to be an evolutionary process.

I was thinking a message flag along with a functionality bit maybe ?

I have never really scratched my head about this issue yet and don't know of any on-going activity. It is notable, though, that we export I2C_SMBUS_BLOCK_MAX to userspace, too.

Right. I don't think we can change it. We could either define a whole new set of block read/write that support "extended" max, or probably easier, a msg flag indicating that this is supported.

We would need a backend bus capability as well since all the busses today will barf if the device returns something larger than I2C_SMBUS_BLOCK_MAX.

Not a huge deal, all this is just a thought, I don't think I have a device to deal with today that will return more on any of my systems (I can double check later). I just noticed that while reading the PMbus spec.

Cheers,
Ben.

#3 lore raw
Quoted 5 lines

Not a huge deal, all this is just a thought, I don't think I have a device to deal with today that will return more on any of my systems (I can double check later). I just noticed that while reading the PMbus spec.

I once stumbled over a TPM device which had a flag to send either 32 or 255 byte. Can't recall which exactly, though.