* [PATCH 2/2] Bluetooth: btmtksdio: fix possible FW initialization failure
2022-05-12 21:38 [PATCH 1/2] Bluetooth: btmtksdio: fix the reset takes too long sean.wang
@ 2022-05-12 21:38 ` sean.wang
2022-05-12 22:01 ` [1/2] Bluetooth: btmtksdio: fix the reset takes too long bluez.test.bot
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: sean.wang @ 2022-05-12 21:38 UTC (permalink / raw)
To: marcel, johan.hedberg
Cc: sean.wang, Soul.Huang, YN.Chen, Leon.Yen, Eric-SY.Chang, Deren.Wu,
km.lin, robin.chiu, Eddie.Chen, ch.yeh, posh.sun, ted.huang,
Eric.Liang, Stella.Chang, Tom.Chou, steve.lee, jsiuda, frankgor,
abhishekpandit, michaelfsun, mcchou, shawnku, linux-bluetooth,
linux-mediatek, linux-kernel, Yake Yang
From: Sean Wang <sean.wang@mediatek.com>
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@mediatek.com>
Signed-off-by: Yake Yang <yake.yang@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
drivers/bluetooth/btmtksdio.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index 26e27fd79a21..d6700efcfe8c 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) {
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* RE: [1/2] Bluetooth: btmtksdio: fix the reset takes too long
2022-05-12 21:38 [PATCH 1/2] Bluetooth: btmtksdio: fix the reset takes too long sean.wang
2022-05-12 21:38 ` [PATCH 2/2] Bluetooth: btmtksdio: fix possible FW initialization failure sean.wang
@ 2022-05-12 22:01 ` bluez.test.bot
2022-05-13 11:21 ` [PATCH 1/2] " patchwork-bot+bluetooth
2022-05-13 14:41 ` AngeloGioacchino Del Regno
3 siblings, 0 replies; 5+ messages in thread
From: bluez.test.bot @ 2022-05-12 22:01 UTC (permalink / raw)
To: linux-bluetooth, sean.wang
[-- Attachment #1: Type: text/plain, Size: 1098 bytes --]
This is automated email and please do not reply to this email!
Dear submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=641161
---Test result---
Test Summary:
CheckPatch PASS 3.34 seconds
GitLint PASS 2.14 seconds
SubjectPrefix PASS 1.72 seconds
BuildKernel PASS 30.44 seconds
BuildKernel32 PASS 30.25 seconds
Incremental Build with patchesPASS 45.84 seconds
TestRunner: Setup PASS 493.42 seconds
TestRunner: l2cap-tester PASS 17.46 seconds
TestRunner: bnep-tester PASS 6.12 seconds
TestRunner: mgmt-tester PASS 106.15 seconds
TestRunner: rfcomm-tester PASS 9.66 seconds
TestRunner: sco-tester PASS 9.65 seconds
TestRunner: smp-tester PASS 10.44 seconds
TestRunner: userchan-tester PASS 7.15 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] Bluetooth: btmtksdio: fix the reset takes too long
2022-05-12 21:38 [PATCH 1/2] Bluetooth: btmtksdio: fix the reset takes too long sean.wang
2022-05-12 21:38 ` [PATCH 2/2] Bluetooth: btmtksdio: fix possible FW initialization failure sean.wang
2022-05-12 22:01 ` [1/2] Bluetooth: btmtksdio: fix the reset takes too long bluez.test.bot
@ 2022-05-13 11:21 ` patchwork-bot+bluetooth
2022-05-13 14:41 ` AngeloGioacchino Del Regno
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+bluetooth @ 2022-05-13 11:21 UTC (permalink / raw)
To: Sean Wang
Cc: marcel, johan.hedberg, Soul.Huang, YN.Chen, Leon.Yen,
Eric-SY.Chang, Deren.Wu, km.lin, robin.chiu, Eddie.Chen, ch.yeh,
posh.sun, ted.huang, Eric.Liang, Stella.Chang, Tom.Chou,
steve.lee, jsiuda, frankgor, abhishekpandit, michaelfsun, mcchou,
shawnku, linux-bluetooth, linux-mediatek, linux-kernel, yake.yang
Hello:
This series was applied to bluetooth/bluetooth-next.git (master)
by Marcel Holtmann <marcel@holtmann.org>:
On Fri, 13 May 2022 05:38:11 +0800 you wrote:
> From: Sean Wang <sean.wang@mediatek.com>
>
> Sending WMT command during the reset in progress is invalid and would get
> no response from firmware until the reset is complete, so we ignore the WMT
> command here to resolve the issue which causes the whole reset process
> taking too long.
>
> [...]
Here is the summary with links:
- [1/2] Bluetooth: btmtksdio: fix the reset takes too long
https://git.kernel.org/bluetooth/bluetooth-next/c/baabb7f530e8
- [2/2] Bluetooth: btmtksdio: fix possible FW initialization failure
https://git.kernel.org/bluetooth/bluetooth-next/c/7469720563e0
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 1/2] Bluetooth: btmtksdio: fix the reset takes too long
2022-05-12 21:38 [PATCH 1/2] Bluetooth: btmtksdio: fix the reset takes too long sean.wang
` (2 preceding siblings ...)
2022-05-13 11:21 ` [PATCH 1/2] " patchwork-bot+bluetooth
@ 2022-05-13 14:41 ` AngeloGioacchino Del Regno
3 siblings, 0 replies; 5+ messages in thread
From: AngeloGioacchino Del Regno @ 2022-05-13 14:41 UTC (permalink / raw)
To: sean.wang, marcel, johan.hedberg
Cc: Soul.Huang, YN.Chen, Leon.Yen, Eric-SY.Chang, Deren.Wu, km.lin,
robin.chiu, Eddie.Chen, ch.yeh, posh.sun, ted.huang, Eric.Liang,
Stella.Chang, Tom.Chou, steve.lee, jsiuda, frankgor,
abhishekpandit, michaelfsun, mcchou, shawnku, linux-bluetooth,
linux-mediatek, linux-kernel, Yake Yang
Il 12/05/22 23:38, sean.wang@mediatek.com ha scritto:
> From: Sean Wang <sean.wang@mediatek.com>
>
> Sending WMT command during the reset in progress is invalid and would get
> no response from firmware until the reset is complete, so we ignore the WMT
> command here to resolve the issue which causes the whole reset process
> taking too long.
>
> Fixes: 8fafe702253d ("Bluetooth: mt7921s: support bluetooth reset mechanism")
> Co-developed-by: Yake Yang <yake.yang@mediatek.com>
> Signed-off-by: Yake Yang <yake.yang@mediatek.com>
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
It may be too late but, in any case, for the entire series:
Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 5+ messages in thread