Bluetooth: btmtksdio: Fix spurious ownership error logs
Subsystems (2)
PATCH 1/1 Bluetooth: btmtksdio: Fix spurious ownership error logs
In btmtksdio_fw_pmctrl(), if an early operation fails (like clearing the mailbox ACK), it jumps to the out: label and spuriously prints "Cannot return ownership to device".
Evaluate the ownership return errors locally to ensure the error log is only printed if the actual ownership transaction fails.
--- drivers/bluetooth/btmtksdio.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
drivers/bluetooth/btmtksdio.c +4 -8
@@ -360,18 +360,14 @@ static int btmtksdio_fw_pmctrl(struct btmtksdio_dev *bdev)/* Return ownership to the device */ sdio_writel (bdev->func,C_FW_OWN_REQ_SET ,MTK_REG_CHLPCR , &err); +if (err ==0 ) + err =readx_poll_timeout (btmtksdio_drv_own_query, bdev, status, + !(status &C_COM_DRV_OWN ),2000 ,1000000 );if (err <0 ) - goto out; - - err =readx_poll_timeout (btmtksdio_drv_own_query, bdev, status, - !(status &C_COM_DRV_OWN ),2000 ,1000000 ); - +bt_dev_err (bdev->hdev,"Cannot return ownership to device" ); out:sdio_release_host (bdev->func); -if (err <0 ) -bt_dev_err (bdev->hdev,"Cannot return ownership to device" ); -return err; }
Signature · 1 line
2.55.0.1007.g17ff1f9808-goog
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/series/1164390/
---Test result---
Test Summary:
CheckPatch PASS 0.68 seconds VerifyFixes PASS 0.10 seconds VerifySignedoff PASS 0.10 seconds GitLint PASS 3.39 seconds SubjectPrefix PASS 0.10 seconds BuildKernel PASS 29.09 seconds CheckAllWarning PASS 33.28 seconds CheckSparse PASS 36.32 seconds BuildKernel32 PASS 29.03 seconds CheckKernelLLVM PASS 35.00 seconds TestRunnerSetup PASS 772.25 seconds IncrementalBuild PASS 26.05 seconds
https://github.com/bluez/bluetooth-next/pull/765
---
Regards,
Linux Bluetooth
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:
Quoted 8 lines · On Mon, 14 Sep 2026 09:46:31 +0000 you wrote:
In
btmtksdio_fw_pmctrl(), if an early operation fails (like clearing the mailbox ACK), it jumps to theout:label and spuriously prints "Cannot return ownership to device".Evaluate the ownership return errors locally to ensure the error log is only printed if the actual ownership transaction fails.
[...]
Here is the summary with links:
- Bluetooth: btmtksdio: Fix spurious ownership error logs
https://git.kernel.org/bluetooth/bluetooth-next/c/382fe279b7de
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html