Skip to contentSkip to conversation

Problem with detection or PMBus devices

lm-sensors Guenter Roeck 2 participants 3 messages Oct 11, 2010 – Oct 12, 2010

lore
Share & tools
lore
#0 lore raw

Hi,

I have been trying to add device detection for PMBus devices to sensors-detect. It works fine for LTC2978.

Problem is that BMR45x chips do not support QUICK commands. As a result, detection code fails early on.

Would it make sense to extend the detection code to also try other commands (eg BYTE_DATA) if QUICK does not work, or would that be too risky ?

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

#1 lore raw

Hi Guenter,

Quoted 8 lines · Guenter Roeck

I have been trying to add device detection for PMBus devices to sensors-detect. It works fine for LTC2978.

Problem is that BMR45x chips do not support QUICK commands. As a result, detection code fails early on.

Would it make sense to extend the detection code to also try other commands (eg BYTE_DATA) if QUICK does not work, or would that be too risky ?

The SMBus quick write command isn't better or worse than a few other SMBus commands as far as device detection is concerned. We are using it extensively for historical reasons: read commands used to lock up the SMBus on some systems when ran on clock devices. But we no longer probe the problematic addresses (0x69 and 0x69 mainly) anyway.

We already have a number of workarounds in place for specific cases (see sub i2c_probe). Depending on the address at which your BMR45x chip lives, a similar trick might be suitable.

We may progressively move to using SMBus byte reads as the default probing method. After all, the actual device identification routines all use this command type. If this would cause any trouble, we would know by now. As long as i2c_safety_check() is called first, I can't think of any problem resulting from this change, and this would avoid the problem of adapters not supporting quick commands.

We might have to update some i2c adapter drivers in the kernel though, to make sure they don't log NACKs on such transactions. Otherwise we'll flood the kernel log at detection time.

Signature · 6 lines
Jean Delvare

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
#2 lore raw
In reply to Guenter Roeck
Quoted 18 lines · Jean Delvare

Hi Guenter,

Quoted 8 lines · Guenter Roeck

I have been trying to add device detection for PMBus devices to sensors-detect. It works fine for LTC2978.

Problem is that BMR45x chips do not support QUICK commands. As a result, detection code fails early on.

Would it make sense to extend the detection code to also try other commands (eg BYTE_DATA) if QUICK does not work, or would that be too risky ?

The SMBus quick write command isn't better or worse than a few other SMBus commands as far as device detection is concerned. We are using it extensively for historical reasons: read commands used to lock up the SMBus on some systems when ran on clock devices. But we no longer probe the problematic addresses (0x69 and 0x69 mainly) anyway.

Quoted 4 lines

We already have a number of workarounds in place for specific cases (see sub i2c_probe). Depending on the address at which your BMR45x chip lives, a similar trick might be suitable.

Valid address range is [0x03..0x0a, 0x0d..0x3f]. So it is quite a broad range.

Quoted 7 lines

We may progressively move to using SMBus byte reads as the default probing method. After all, the actual device identification routines all use this command type. If this would cause any trouble, we would know by now. As long as i2c_safety_check() is called first, I can't think of any problem resulting from this change, and this would avoid the problem of adapters not supporting quick commands.

Ok, I'll try that. Note the problem here is not the adapter - apparently it is the bmr chips which don't support quick commands. Other chips on the same adapter (such as the ltc2978 and max6696) are detected fine with quick commands.

Thanks,
Guenter

_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors