i2c: hisi: Only handle the interrupt of the driver's transfer
authorYicong Yang <yangyicong@hisilicon.com>
Tue, 1 Aug 2023 12:46:25 +0000 (20:46 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2023 15:52:30 +0000 (17:52 +0200)
commitba249011f6651952eef267f00f6086c8bac15049
tree06716ff7f99dbe247bdd3d1bed11f8ae165c4a75
parentdb0416c15572adffaa82278bdc30d892401d76c9
i2c: hisi: Only handle the interrupt of the driver's transfer

commit fff67c1b17ee093947bdcbac6f64d072e644159a upstream.

The controller may be shared with other port, for example the firmware.
Handle the interrupt from other sources will cause crash since some
data are not initialized. So only handle the interrupt of the driver's
transfer and discard others.

Fixes: d62fbdb99a85 ("i2c: add support for HiSilicon I2C controller")
Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20230801124625.63587-1-yangyicong@huawei.com
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i2c/busses/i2c-hisi.c