diff options
author | Guenter Roeck <linux@roeck-us.net> | 2022-01-10 09:28:56 -0800 |
---|---|---|
committer | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2024-07-29 09:46:43 +0200 |
commit | 37c526f00bc1c4f847fc800085f8f009d2e11be6 (patch) | |
tree | de45082bad6b88c479b620cb7b4b384009f9b64c /ipc | |
parent | 8400291e289ee6b2bf9779ff1c83a291501f017b (diff) | |
download | linux-stable-37c526f00bc1c4f847fc800085f8f009d2e11be6.tar.gz linux-stable-37c526f00bc1c4f847fc800085f8f009d2e11be6.tar.bz2 linux-stable-37c526f00bc1c4f847fc800085f8f009d2e11be6.zip |
i2c: smbus: Improve handling of stuck alerts
The following messages were observed while testing alert functionality
on systems with multiple I2C devices on a single bus if alert was active
on more than one chip.
smbus_alert 3-000c: SMBALERT# from dev 0x0c, flag 0
smbus_alert 3-000c: no driver alert()!
and:
smbus_alert 3-000c: SMBALERT# from dev 0x28, flag 0
Once it starts, this message repeats forever at high rate. There is no
device at any of the reported addresses.
Analysis shows that this is seen if multiple devices have the alert pin
active. Apparently some devices do not support SMBus arbitration correctly.
They keep sending address bits after detecting an address collision and
handle the collision not at all or too late.
Specifically, address 0x0c is seen with ADT7461A at address 0x4c and
ADM1021 at address 0x18 if alert is active on both chips. Address 0x28 is
seen with ADT7483 at address 0x2a and ADT7461 at address 0x4c if alert is
active on both chips.
Once the system is in bad state (alert is set by more than one chip),
it often only recovers by power cycling.
To reduce the impact of this problem, abort the endless loop in
smbus_alert() if the same address is read more than once and not
handled by a driver.
Fixes: b5527a7766f0 ("i2c: Add SMBus alert support")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
[wsa: it also fixed an interrupt storm in one of my experiments]
Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
[wsa: rebased, moved a comment as well, improved the 'invalid' value]
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions