Skip to content

Commit db3f1f9

Browse files
moore-brosholtmann
authored andcommitted
Bluetooth: btmtksdio: mask out interrupt status
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: 26270bc ("Bluetooth: btmtksdio: move interrupt service to work") Signed-off-by: Sean Wang <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent e98aa38 commit db3f1f9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/bluetooth/btmtksdio.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ MODULE_DEVICE_TABLE(sdio, btmtksdio_table);
9292
#define TX_EMPTY BIT(2)
9393
#define TX_FIFO_OVERFLOW BIT(8)
9494
#define FW_MAILBOX_INT BIT(15)
95+
#define INT_MASK GENMASK(15, 0)
9596
#define RX_PKT_LEN GENMASK(31, 16)
9697

9798
#define MTK_REG_CSICR 0xc0
@@ -565,6 +566,7 @@ static void btmtksdio_txrx_work(struct work_struct *work)
565566
* FIFO.
566567
*/
567568
sdio_writel(bdev->func, int_status, MTK_REG_CHISR, NULL);
569+
int_status &= INT_MASK;
568570

569571
if ((int_status & FW_MAILBOX_INT) &&
570572
bdev->data->chipid == 0x7921) {

0 commit comments

Comments
 (0)