i2c: i801: Fix interrupt storm from SMB_ALERT signal
authorJarkko Nikula <jarkko.nikula@linux.intel.com>
Wed, 17 Nov 2021 09:45:09 +0000 (11:45 +0200)
committerWolfram Sang <wsa@kernel.org>
Tue, 23 Nov 2021 09:43:50 +0000 (10:43 +0100)
commit03a976c9afb5e3c4f8260c6c08a27d723b279c92
treeff67abf05f690d89fdd61a0c8c240d9be68d6cf5
parent9b5bf5878138293fb5b14a48a7a17b6ede6bea25
i2c: i801: Fix interrupt storm from SMB_ALERT signal

Currently interrupt storm will occur from i2c-i801 after first
transaction if SMB_ALERT signal is enabled and ever asserted. It is
enough if the signal is asserted once even before the driver is loaded
and does not recover because that interrupt is not acknowledged.

This fix aims to fix it by two ways:
- Add acknowledging for the SMB_ALERT interrupt status
- Disable the SMB_ALERT interrupt on platforms where possible since the
  driver currently does not make use for it

Acknowledging resets the SMB_ALERT interrupt status on all platforms and
also should help to avoid interrupt storm on older platforms where the
SMB_ALERT interrupt disabling is not available.

For simplicity this fix reuses the host notify feature for disabling and
restoring original register value.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=177311
Reported-by: ck+kernelbugzilla@bl4ckb0x.de
Reported-by: stephane.poignant@protonmail.com
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Tested-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-i801.c