* [PATCH v2] i2c: aspeed: Fix the dummy irq expected print
@ 2024-03-05 1:19 Tommy Huang
2024-03-06 11:55 ` Andi Shyti
0 siblings, 1 reply; 2+ messages in thread
From: Tommy Huang @ 2024-03-05 1:19 UTC (permalink / raw
To: brendan.higgins, benh, joel, andi.shyti, andrew, jae.hyun.yoo,
wsa
Cc: BMC-SW, linux-aspeed, openbmc, linux-kernel, linux-i2c,
linux-arm-kernel
When the i2c error condition occurred and master state was not
idle, the master irq function will goto complete state without any
other interrupt handling. It would cause dummy irq expected print.
Under this condition, assign the irq_status into irq_handle.
For example, when the abnormal start / stop occurred (bit 5) with
normal stop status (bit 4) at same time. Then the normal stop status
would not be handled and it would cause irq expected print in
the aspeed_i2c_bus_irq.
...
aspeed-i2c-bus x. i2c-bus: irq handled != irq.
Expected 0x00000030, but was 0x00000020
...
Fixes: 3e9efc3299dd ("i2c: aspeed: Handle master/slave combined irq events properly")
Cc: Jae Hyun Yoo <jae.hyun.yoo@linux.intel.com>
Signed-off-by: Tommy Huang <tommy_huang@aspeedtech.com>
---
drivers/i2c/busses/i2c-aspeed.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index 5511fd46a65e..ce8c4846b7fa 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -445,6 +445,7 @@ static u32 aspeed_i2c_master_irq(struct aspeed_i2c_bus *bus, u32 irq_status)
irq_status);
irq_handled |= (irq_status & ASPEED_I2CD_INTR_MASTER_ERRORS);
if (bus->master_state != ASPEED_I2C_MASTER_INACTIVE) {
+ irq_handled = irq_status;
bus->cmd_err = ret;
bus->master_state = ASPEED_I2C_MASTER_INACTIVE;
goto out_complete;
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] i2c: aspeed: Fix the dummy irq expected print
2024-03-05 1:19 [PATCH v2] i2c: aspeed: Fix the dummy irq expected print Tommy Huang
@ 2024-03-06 11:55 ` Andi Shyti
0 siblings, 0 replies; 2+ messages in thread
From: Andi Shyti @ 2024-03-06 11:55 UTC (permalink / raw
To: brendan.higgins, benh, joel, andrew, jae.hyun.yoo, wsa,
Tommy Huang
Cc: BMC-SW, linux-aspeed, openbmc, linux-kernel, linux-i2c,
linux-arm-kernel
Hi
On Tue, 05 Mar 2024 09:19:06 +0800, Tommy Huang wrote:
> When the i2c error condition occurred and master state was not
> idle, the master irq function will goto complete state without any
> other interrupt handling. It would cause dummy irq expected print.
> Under this condition, assign the irq_status into irq_handle.
>
> For example, when the abnormal start / stop occurred (bit 5) with
> normal stop status (bit 4) at same time. Then the normal stop status
> would not be handled and it would cause irq expected print in
> the aspeed_i2c_bus_irq.
>
> [...]
Applied to i2c/i2c-host-fixes on
git://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git
Thank you,
Andi
Patches applied
===============
[1/1] i2c: aspeed: Fix the dummy irq expected print
commit: 94e889260a5bae7d4c06de90f1724aeb8b1175c6
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-03-06 11:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-05 1:19 [PATCH v2] i2c: aspeed: Fix the dummy irq expected print Tommy Huang
2024-03-06 11:55 ` Andi Shyti
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).