Patch "serial: amba-pl011: Fix RX stall when DMA is used" has been added to the 6.6-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

    serial: amba-pl011: Fix RX stall when DMA is used

to the 6.6-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:
     serial-amba-pl011-fix-rx-stall-when-dma-is-used.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 0479945f2554582f2418bd6efc486d28d831981a
Author: Kartik Rajput <kkartik@xxxxxxxxxx>
Date:   Wed Nov 13 14:56:29 2024 +0530

    serial: amba-pl011: Fix RX stall when DMA is used
    
    [ Upstream commit 2bcacc1c87acf9a8ebc17de18cb2b3cfeca547cf ]
    
    Function pl011_throttle_rx() calls pl011_stop_rx() to disable RX, which
    also disables the RX DMA by clearing the RXDMAE bit of the DMACR
    register. However, to properly unthrottle RX when DMA is used, the
    function pl011_unthrottle_rx() is expected to set the RXDMAE bit of
    the DMACR register, which it currently lacks. This causes RX to stall
    after the throttle API is called.
    
    Set RXDMAE bit in the DMACR register while unthrottling RX if RX DMA is
    used.
    
    Fixes: 211565b10099 ("serial: pl011: UPSTAT_AUTORTS requires .throttle/unthrottle")
    Cc: stable@xxxxxxxxxxxxxxx
    Signed-off-by: Kartik Rajput <kkartik@xxxxxxxxxx>
    Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20241113092629.60226-1-kkartik@xxxxxxxxxx
    Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 16c7703110694..08f80188f73dd 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1837,6 +1837,11 @@ static void pl011_unthrottle_rx(struct uart_port *port)
 
 	pl011_write(uap->im, uap, REG_IMSC);
 
+	if (uap->using_rx_dma) {
+		uap->dmacr |= UART011_RXDMAE;
+		pl011_write(uap->dmacr, uap, REG_DMACR);
+	}
+
 	uart_port_unlock_irqrestore(&uap->port, flags);
 }
 




[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