Chengfeng Ye 3259e2d878 i2c: bcm-iproc: Fix bcm_iproc_i2c_isr deadlock issue
commit 4caf4cb1eaed469742ef719f2cc024b1ec3fa9e6 upstream.

iproc_i2c_rd_reg() and iproc_i2c_wr_reg() are called from both
interrupt context (e.g. bcm_iproc_i2c_isr) and process context
(e.g. bcm_iproc_i2c_suspend). Therefore, interrupts should be
disabled to avoid potential deadlock. To prevent this scenario,
use spin_lock_irqsave().

Fixes: 9a1038728037 ("i2c: iproc: add NIC I2C support")
Signed-off-by: Chengfeng Ye <dg573847474@gmail.com>
Acked-by: Ray Jui <ray.jui@broadcom.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:27:15 +02:00
..
2019-08-29 21:07:30 +02:00
2020-10-07 08:01:29 +02:00
2021-05-14 09:44:29 +02:00
2021-09-15 09:47:35 +02:00
2021-05-14 09:44:29 +02:00
2021-09-15 09:47:36 +02:00
2019-09-28 20:44:12 +02:00
2021-09-15 09:47:35 +02:00
2021-05-14 09:44:30 +02:00
2022-03-08 19:07:46 +01:00