Patch "Bluetooth: btmtksdio: mask out interrupt status" has been added to the 5.17-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

    Bluetooth: btmtksdio: mask out interrupt status

to the 5.17-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:
     bluetooth-btmtksdio-mask-out-interrupt-status.patch
and it can be found in the queue-5.17 subdirectory.

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



commit 2c6f79fd8ac9d1b1eddf04735d95ce2d726411a3
Author: Sean Wang <sean.wang@xxxxxxxxxxxx>
Date:   Wed Jan 12 15:39:17 2022 +0800

    Bluetooth: btmtksdio: mask out interrupt status
    
    [ Upstream commit db3f1f9b5d88d8d7f9eaa486f71784dd319285ff ]
    
    Currently, there is a loop in btmtksdio_txrx_work() which iteratively
    executes until the variable int_status is zero.
    
    But the variable int_status should be masked out with the actual interrupt
    sources (MTK_REG_CHISR bit 0-15) before we check the loop condition.
    Otherwise, RX_PKT_LEN (MTK_REG_CHISR bit 16-31) which is read-only and
    unclearable would cause the loop to get stuck on some chipsets like
    MT7663s.
    
    Fixes: 26270bc189ea ("Bluetooth: btmtksdio: move interrupt service to work")
    Signed-off-by: Sean Wang <sean.wang@xxxxxxxxxxxx>
    Signed-off-by: Marcel Holtmann <marcel@xxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index 72e00264d9f1..86a52eb77e01 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -92,6 +92,7 @@ MODULE_DEVICE_TABLE(sdio, btmtksdio_table);
 #define TX_EMPTY		BIT(2)
 #define TX_FIFO_OVERFLOW	BIT(8)
 #define FW_MAILBOX_INT		BIT(15)
+#define INT_MASK		GENMASK(15, 0)
 #define RX_PKT_LEN		GENMASK(31, 16)
 
 #define MTK_REG_CSICR		0xc0
@@ -565,6 +566,7 @@ static void btmtksdio_txrx_work(struct work_struct *work)
 		 * FIFO.
 		 */
 		sdio_writel(bdev->func, int_status, MTK_REG_CHISR, NULL);
+		int_status &= INT_MASK;
 
 		if ((int_status & FW_MAILBOX_INT) &&
 		    bdev->data->chipid == 0x7921) {



[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