Patch "mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt" has been added to the 6.7-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt

to the 6.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mailbox-arm_mhuv2-fix-a-bug-for-mhuv2_sender_interru.patch
and it can be found in the queue-6.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f70cf400f0157dfb7c70e8f34648ca58077e218d
Author: Xiaowu.ding <xiaowu.ding@xxxxxxxxxxxxxxx>
Date:   Tue Dec 12 19:37:22 2023 +0800

    mailbox: arm_mhuv2: Fix a bug for mhuv2_sender_interrupt
    
    [ Upstream commit ee01c0b4384d19ecc5dfa7db3fd4303f965c3eba ]
    
    Message Handling Unit version is v2.1.
    
    When arm_mhuv2 working with the data protocol transfer mode.
    We have split one mhu into two channels, and every channel
    include four channel windows, the two channels share
    one gic spi interrupt.
    
    There is a problem with the sending scenario.
    
    The first channel will take up 0-3 channel windows, and the second
    channel take up 4-7 channel windows. When the first channel send the
    data, and the receiver will clear all the four channels status.
    Although we only enabled the interrupt on the last channel window with
    register CH_INT_EN,the register CHCOMB_INT_ST0 will be 0xf, not be 0x8.
    Currently we just clear the last channel windows int status with the
    data proctol mode.So after that,the CHCOMB_INT_ST0 status will be 0x7,
    not be the 0x0.
    
    Then the second channel send the data, the receiver read the
    data, clear all the four channel windows status, trigger the sender
    interrupt. But currently the CHCOMB_INT_ST0 register will be 0xf7,
    get_irq_chan_comb function will always return the first channel.
    
    So this patch clear all channel windows int status to avoid this interrupt
    confusion.
    
    Signed-off-by: Xiaowu.ding <xiaowu.ding@xxxxxxxxxxxxxxx>
    Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
    Signed-off-by: Jassi Brar <jaswinder.singh@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/mailbox/arm_mhuv2.c b/drivers/mailbox/arm_mhuv2.c
index c6d4957c4da8..0ec21dcdbde7 100644
--- a/drivers/mailbox/arm_mhuv2.c
+++ b/drivers/mailbox/arm_mhuv2.c
@@ -553,7 +553,8 @@ static irqreturn_t mhuv2_sender_interrupt(int irq, void *data)
 	priv = chan->con_priv;
 
 	if (!IS_PROTOCOL_DOORBELL(priv)) {
-		writel_relaxed(1, &mhu->send->ch_wn[priv->ch_wn_idx + priv->windows - 1].int_clr);
+		for (i = 0; i < priv->windows; i++)
+			writel_relaxed(1, &mhu->send->ch_wn[priv->ch_wn_idx + i].int_clr);
 
 		if (chan->cl) {
 			mbox_chan_txdone(chan, 0);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux