Sorry for my bad writing.... :(Signed-off-by: Haiyue Wang <haiyue.wang@xxxxxxxxxxxxxxx>
---
Hi Corey,
This patch looks introducing BIG modification, it should be easily
understandable, and makes code clean & fix an error design, which
is introduced by misunderstanding the IRQ return value.
I'm having a little trouble understanding your text above, so let me try to repeat
back to you what I'm thinking you are saying...
You have two (or more) devices using the same interrupt, and at least one is an
IPMI KCS device. And interrupt comes in to the other device when the IPMI KCS
device is not running. The original code issues an abort when that happens,
which is obviously incorrect. It then returns -ENODATA, .
When the interrupt comes in for the abort handling, the driver will then issue
another abort, and again returns -ENODATA. This time neither driver handles
the interrupt, resulting in the logs.
In general, I think the change you have here is good. You don't want to
issue an abort in this case. But...
If I am right, this fix doesn't completely solve the problem. It does solve thisIn fact, in BMC chip design, the LPC controller has many devices, such as
immediate problem, but what if there is an OS on the other end of the
KCS interface that sets the IBF flag? The same situation will occur. In fact
it will occur even if there is only one handler for the interrupt.
Maybe it's best to have the interrupt disabled unless the device is open.
You have to handle the interrupt disable race on a close, but with the
sync functions that shouldn't be too hard.
-corey