[Pdbg] [PATCH 2/2] i2c: Add FORCE option

Joel Stanley joel at jms.id.au
Fri Jun 15 14:47:07 AEST 2018


On 15 June 2018 at 14:15, Alistair Popple <alistair at popple.id.au> wrote:
> I've already taken the first patch in this series but I'm not sure about this
> one, comments below.
>
> On Wednesday, 13 June 2018 4:10:54 PM AEST Joel Stanley wrote:
>> On P8 machines with OpenBMC, the i2c address is claimed by the OCC hwmon
>> driver. We can ignore it and talk to the device anyway by passing
>> I2C_SLAVE_FORCE instead of I2C_SLAVE to the open ioctl.
>>
>> This might not be the best idea, but it works fine for eg. getscom.
>
> Probably not :-)
>
> At least I'd like to see some kind of warning to the user that we might be
> breaking their I2C/OCC. Perhaps something along the lines of attempting a normal
> I2C_SLAVE ioctl and if that fails print a warning that you should unbind the
> hwmon driver before continuing with I2C_SLAVE_FORCE anyway. Or a --force flag but I'd
> be happy enough with just a warning prior to breaking things.

As we found it testing, this won't break their OCC as much as the OCC
will break their pdbgging.

We could add a --force, as this appears to work okay short command -
getscom and friends.

I will send a v2 with your suggestion.

Cheers,

Joel


More information about the Pdbg mailing list