Patch "Bluetooth: btmtksdio: fix possible FW initialization failure" has been added to the 5.18-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: fix possible FW initialization failure

to the 5.18-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-fix-possible-fw-initialization-f.patch
and it can be found in the queue-5.18 subdirectory.

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



commit 7c68d83156700949c1060628f354d035c7cbdc27
Author: Sean Wang <sean.wang@xxxxxxxxxxxx>
Date:   Fri May 13 05:38:12 2022 +0800

    Bluetooth: btmtksdio: fix possible FW initialization failure
    
    [ Upstream commit 7469720563e01f479ec5afe06bd6f440f965d523 ]
    
    According to FW advised sequence, mt7921s need to re-acquire privilege
    immediately after the firmware download is complete before normal running.
    Otherwise, it is still possible the bus may be stuck in an abnormal status
    that causes FW initialization failure in the current driver.
    
    Fixes: 752aea58489f ("Bluetooth: mt7921s: fix bus hang with wrong privilege")
    Co-developed-by: Yake Yang <yake.yang@xxxxxxxxxxxx>
    Signed-off-by: Yake Yang <yake.yang@xxxxxxxxxxxx>
    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 4ae6631a7c29..5d13c1f61bd3 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -864,6 +864,14 @@ static int mt79xx_setup(struct hci_dev *hdev, const char *fwname)
 		return err;
 	}
 
+	err = btmtksdio_fw_pmctrl(bdev);
+	if (err < 0)
+		return err;
+
+	err = btmtksdio_drv_pmctrl(bdev);
+	if (err < 0)
+		return err;
+
 	/* Enable Bluetooth protocol */
 	wmt_params.op = BTMTK_WMT_FUNC_CTRL;
 	wmt_params.flag = 0;
@@ -1109,14 +1117,6 @@ static int btmtksdio_setup(struct hci_dev *hdev)
 		if (err < 0)
 			return err;
 
-		err = btmtksdio_fw_pmctrl(bdev);
-		if (err < 0)
-			return err;
-
-		err = btmtksdio_drv_pmctrl(bdev);
-		if (err < 0)
-			return err;
-
 		/* Enable SCO over I2S/PCM */
 		err = btmtksdio_sco_setting(hdev);
 		if (err < 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