Patch "i3c: mipi-i3c-hci: Add Intel specific quirk to ring resuming" has been added to the 6.13-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

    i3c: mipi-i3c-hci: Add Intel specific quirk to ring resuming

to the 6.13-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:
     i3c-mipi-i3c-hci-add-intel-specific-quirk-to-ring-re.patch
and it can be found in the queue-6.13 subdirectory.

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



commit 59a59401a5fff2a3f0b4e082174806dcc20fe30c
Author: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>
Date:   Tue Dec 31 13:59:03 2024 +0200

    i3c: mipi-i3c-hci: Add Intel specific quirk to ring resuming
    
    [ Upstream commit ccdb2e0e3b00d13df90ac7a0524dd855173f1171 ]
    
    MIPI I3C HCI on Intel hardware requires a quirk where ring needs to stop
    and set to run again after resuming the halted controller. This is not
    expected from the MIPI I3C HCI specification and is Intel specific.
    
    Add this quirk to generic aborted transfer handling and execute it only
    when ring is not in running state after a transfer error and attempted
    controller resume. This is the case on Intel hardware.
    
    It is not fully clear to me what is the ring running state in generic
    hardware in such case. I would expect if ring is not running, then stop
    request is a no-op and run request is either required or does the same
    what controller resume would do.
    
    Signed-off-by: Jarkko Nikula <jarkko.nikula@xxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241231115904.620052-1-jarkko.nikula@xxxxxxxxxxxxxxx
    Signed-off-by: Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/i3c/master/mipi-i3c-hci/dma.c b/drivers/i3c/master/mipi-i3c-hci/dma.c
index e8e56a8d20573..491dfe70b6600 100644
--- a/drivers/i3c/master/mipi-i3c-hci/dma.c
+++ b/drivers/i3c/master/mipi-i3c-hci/dma.c
@@ -758,9 +758,26 @@ static bool hci_dma_irq_handler(struct i3c_hci *hci)
 			complete(&rh->op_done);
 
 		if (status & INTR_TRANSFER_ABORT) {
+			u32 ring_status;
+
 			dev_notice_ratelimited(&hci->master.dev,
 				"ring %d: Transfer Aborted\n", i);
 			mipi_i3c_hci_resume(hci);
+			ring_status = rh_reg_read(RING_STATUS);
+			if (!(ring_status & RING_STATUS_RUNNING) &&
+			    status & INTR_TRANSFER_COMPLETION &&
+			    status & INTR_TRANSFER_ERR) {
+				/*
+				 * Ring stop followed by run is an Intel
+				 * specific required quirk after resuming the
+				 * halted controller. Do it only when the ring
+				 * is not in running state after a transfer
+				 * error.
+				 */
+				rh_reg_write(RING_CONTROL, RING_CTRL_ENABLE);
+				rh_reg_write(RING_CONTROL, RING_CTRL_ENABLE |
+							   RING_CTRL_RUN_STOP);
+			}
 		}
 		if (status & INTR_WARN_INS_STOP_MODE)
 			dev_warn_ratelimited(&hci->master.dev,




[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