diff options
author | 2021-06-01 10:48:18 +0000 | |
---|---|---|
committer | 2021-06-07 00:23:58 +0200 | |
commit | 897120d41e7afd9da435cb00041a142aeeb53c07 (patch) | |
tree | 05573ba7f8beb5704b3805cb5a9f8805b7d0dc23 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | Merge tag 'renesas-pinctrl-for-v5.14-tag1' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers into devel (diff) | |
download | linux-dev-897120d41e7afd9da435cb00041a142aeeb53c07.tar.xz linux-dev-897120d41e7afd9da435cb00041a142aeeb53c07.zip |
pinctrl: mcp23s08: fix race condition in irq handler
Checking value of MCP_INTF in mcp23s08_irq suggests that the handler may be
called even when there is no interrupt pending.
But the actual interrupt could happened between reading MCP_INTF and MCP_GPIO.
In this situation we got nothing from MCP_INTF, but the event gets acknowledged
on the expander by reading MCP_GPIO. This leads to losing events.
Fix the problem by not reading any register until we see something in MCP_INTF.
The error was reproduced and fix tested on MCP23017.
Signed-off-by: Radim Pavlik <radim.pavlik@tbs-biometrics.com>
Link: https://lore.kernel.org/r/AM7PR06MB6769E1183F68DEBB252F665ABA3E9@AM7PR06MB6769.eurprd06.prod.outlook.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions