* RE: [v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature
2023-04-19 14:23 Neeraj Sanjay Kale
@ 2023-04-19 14:37 ` bluez.test.bot
2023-04-19 21:18 ` Luiz Augusto von Dentz
0 siblings, 1 reply; 6+ messages in thread
From: bluez.test.bot @ 2023-04-19 14:37 UTC (permalink / raw)
To: linux-bluetooth, neeraj.sanjaykale
[-- Attachment #1: Type: text/plain, Size: 560 bytes --]
This is an automated email and please do not reply to this email.
Dear Submitter,
Thank you for submitting the patches to the linux bluetooth mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
----- Output -----
error: patch failed: drivers/bluetooth/btnxpuart.c:755
error: drivers/bluetooth/btnxpuart.c: patch does not apply
hint: Use 'git am --show-current-patch' to see the failed patch
Please resolve the issue and submit the patches again.
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature
@ 2023-04-19 15:24 Neeraj Sanjay Kale
2023-04-19 16:02 ` [v2] " bluez.test.bot
2023-04-20 21:00 ` [PATCH v2] " patchwork-bot+bluetooth
0 siblings, 2 replies; 6+ messages in thread
From: Neeraj Sanjay Kale @ 2023-04-19 15:24 UTC (permalink / raw)
To: marcel, johan.hedberg, luiz.dentz, pmenzel
Cc: linux-kernel, linux-bluetooth, amitkumar.karwar, rohit.fule,
sherry.sun, neeraj.sanjaykale
This enables flow control before checking for bootloader signature and
deciding whether FW download is needed or not. In case of V1 bootloader
chips w8987 and w8997, it is observed that if WLAN FW is downloaded first
and power save is enabled in wlan core, bootloader signatures are not
emitted by the BT core when the chip is put to sleep. As a result, the
driver skips FW download and subsequent HCI commands get timeout errors
in dmesg as shown below:
[ 112.898867] Bluetooth: hci0: Opcode 0x c03 failed: -110
[ 114.914865] Bluetooth: hci0: Setting baudrate failed (-110)
[ 116.930856] Bluetooth: hci0: Setting wake-up method failed (-110)
By enabling the flow control, the host enables its RTS pin, and an
interrupt in chip's UART peripheral causes the bootloader to wake up,
enabling the bootloader signatures, which then helps in downloading
the bluetooth FW file.
This changes all instances of 0/1 for serdev_device_set_flow_control()
to false/true.
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
---
v2: Add error log in commit message, replace 0/1 with false/true (Paul Menzel)
---
drivers/bluetooth/btnxpuart.c | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 31046f26e712..3a34d7c1475b 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -535,7 +535,7 @@ static int nxp_download_firmware(struct hci_dev *hdev)
nxpdev->helper_downloaded = false;
serdev_device_set_baudrate(nxpdev->serdev, HCI_NXP_PRI_BAUDRATE);
- serdev_device_set_flow_control(nxpdev->serdev, 0);
+ serdev_device_set_flow_control(nxpdev->serdev, false);
nxpdev->current_baudrate = HCI_NXP_PRI_BAUDRATE;
/* Wait till FW is downloaded and CTS becomes low */
@@ -548,7 +548,7 @@ static int nxp_download_firmware(struct hci_dev *hdev)
return -ETIMEDOUT;
}
- serdev_device_set_flow_control(nxpdev->serdev, 1);
+ serdev_device_set_flow_control(nxpdev->serdev, true);
err = serdev_device_wait_for_cts(nxpdev->serdev, 1, 60000);
if (err < 0) {
bt_dev_err(hdev, "CTS is still high. FW Download failed.");
@@ -740,7 +740,7 @@ static int nxp_recv_fw_req_v1(struct hci_dev *hdev, struct sk_buff *skb)
if (nxpdev->baudrate_changed) {
serdev_device_set_baudrate(nxpdev->serdev,
HCI_NXP_SEC_BAUDRATE);
- serdev_device_set_flow_control(nxpdev->serdev, 1);
+ serdev_device_set_flow_control(nxpdev->serdev, true);
nxpdev->current_baudrate = HCI_NXP_SEC_BAUDRATE;
}
goto free_skb;
@@ -763,7 +763,7 @@ static int nxp_recv_fw_req_v1(struct hci_dev *hdev, struct sk_buff *skb)
serdev_device_wait_until_sent(nxpdev->serdev, 0);
serdev_device_set_baudrate(nxpdev->serdev,
HCI_NXP_SEC_BAUDRATE);
- serdev_device_set_flow_control(nxpdev->serdev, 1);
+ serdev_device_set_flow_control(nxpdev->serdev, true);
} else {
clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state);
wake_up_interruptible(&nxpdev->fw_dnld_done_wait_q);
@@ -880,7 +880,7 @@ static int nxp_recv_fw_req_v3(struct hci_dev *hdev, struct sk_buff *skb)
if (nxpdev->baudrate_changed) {
serdev_device_set_baudrate(nxpdev->serdev,
HCI_NXP_SEC_BAUDRATE);
- serdev_device_set_flow_control(nxpdev->serdev, 1);
+ serdev_device_set_flow_control(nxpdev->serdev, true);
nxpdev->current_baudrate = HCI_NXP_SEC_BAUDRATE;
}
goto free_skb;
@@ -984,7 +984,7 @@ static int nxp_set_ind_reset(struct hci_dev *hdev, void *data)
static int nxp_check_boot_sign(struct btnxpuart_dev *nxpdev)
{
serdev_device_set_baudrate(nxpdev->serdev, HCI_NXP_PRI_BAUDRATE);
- serdev_device_set_flow_control(nxpdev->serdev, 0);
+ serdev_device_set_flow_control(nxpdev->serdev, true);
set_bit(BTNXPUART_CHECK_BOOT_SIGNATURE, &nxpdev->tx_state);
return wait_event_interruptible_timeout(nxpdev->check_boot_sign_wait_q,
@@ -1012,7 +1012,6 @@ static int nxp_setup(struct hci_dev *hdev)
clear_bit(BTNXPUART_FW_DOWNLOADING, &nxpdev->tx_state);
}
- serdev_device_set_flow_control(nxpdev->serdev, 1);
device_property_read_u32(&nxpdev->serdev->dev, "fw-init-baudrate",
&nxpdev->fw_init_baudrate);
if (!nxpdev->fw_init_baudrate)
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* RE: [v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature
2023-04-19 15:24 [PATCH v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature Neeraj Sanjay Kale
@ 2023-04-19 16:02 ` bluez.test.bot
2023-04-20 6:43 ` Neeraj sanjay kale
2023-04-20 21:00 ` [PATCH v2] " patchwork-bot+bluetooth
1 sibling, 1 reply; 6+ messages in thread
From: bluez.test.bot @ 2023-04-19 16:02 UTC (permalink / raw)
To: linux-bluetooth, neeraj.sanjaykale
[-- Attachment #1: Type: text/plain, Size: 1423 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=741399
---Test result---
Test Summary:
CheckPatch PASS 0.65 seconds
GitLint PASS 0.26 seconds
SubjectPrefix PASS 0.06 seconds
BuildKernel PASS 43.02 seconds
CheckAllWarning PASS 46.60 seconds
CheckSparse PASS 51.84 seconds
CheckSmatch PASS 138.05 seconds
BuildKernel32 PASS 41.38 seconds
TestRunnerSetup PASS 573.80 seconds
TestRunner_l2cap-tester PASS 20.80 seconds
TestRunner_iso-tester PASS 26.49 seconds
TestRunner_bnep-tester PASS 7.21 seconds
TestRunner_mgmt-tester PASS 141.73 seconds
TestRunner_rfcomm-tester PASS 11.55 seconds
TestRunner_sco-tester PASS 10.92 seconds
TestRunner_ioctl-tester PASS 12.47 seconds
TestRunner_mesh-tester PASS 8.81 seconds
TestRunner_smp-tester PASS 9.86 seconds
TestRunner_userchan-tester PASS 7.63 seconds
IncrementalBuild PASS 39.02 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature
2023-04-19 14:37 ` [v2] " bluez.test.bot
@ 2023-04-19 21:18 ` Luiz Augusto von Dentz
0 siblings, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2023-04-19 21:18 UTC (permalink / raw)
To: linux-bluetooth; +Cc: neeraj.sanjaykale
Hi Neeraj,
On Wed, Apr 19, 2023 at 7:40 AM <bluez.test.bot@gmail.com> wrote:
>
> This is an automated email and please do not reply to this email.
>
> Dear Submitter,
>
> Thank you for submitting the patches to the linux bluetooth mailing list.
> While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.
>
> ----- Output -----
>
> error: patch failed: drivers/bluetooth/btnxpuart.c:755
> error: drivers/bluetooth/btnxpuart.c: patch does not apply
> hint: Use 'git am --show-current-patch' to see the failed patch
>
> Please resolve the issue and submit the patches again.
You probably need to rebase since I pushed the following changes:
https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git/commit/?id=183d1a0466eb3e75cb9e60f031cac2a4f2dffb80
--
Luiz Augusto von Dentz
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: [v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature
2023-04-19 16:02 ` [v2] " bluez.test.bot
@ 2023-04-20 6:43 ` Neeraj sanjay kale
0 siblings, 0 replies; 6+ messages in thread
From: Neeraj sanjay kale @ 2023-04-20 6:43 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org; +Cc: luiz.dentz@gmail.com
Hi Luiz,
I have already rebased my local repo and re-sent the v2 patch which has passed CI.
Please let me know if that's okay, or I should have sent it as a v3 patch.
Thanks,
Neeraj
> -----Original Message-----
> From: bluez.test.bot@gmail.com <bluez.test.bot@gmail.com>
> Sent: Wednesday, April 19, 2023 9:33 PM
> To: linux-bluetooth@vger.kernel.org; Neeraj sanjay kale
> <neeraj.sanjaykale@nxp.com>
> Subject: RE: [v2] Bluetooth: btnxpuart: Enable flow control before
> checking boot signature
>
> 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://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fp
> atchwork.kernel.org%2Fproject%2Fbluetooth%2Flist%2F%3Fseries%3D74139
> 9&data=05%7C01%7Cneeraj.sanjaykale%40nxp.com%7C79951d698881465b8
> cdc08db40ef861d%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63
> 8175169714039256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMD
> AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C
> &sdata=6aDUcH5b18oDWqwCqW09yxvE4lMa%2FlnMwcJCbOSq5Kc%3D&res
> erved=0
>
> ---Test result---
>
> Test Summary:
> CheckPatch PASS 0.65 seconds
> GitLint PASS 0.26 seconds
> SubjectPrefix PASS 0.06 seconds
> BuildKernel PASS 43.02 seconds
> CheckAllWarning PASS 46.60 seconds
> CheckSparse PASS 51.84 seconds
> CheckSmatch PASS 138.05 seconds
> BuildKernel32 PASS 41.38 seconds
> TestRunnerSetup PASS 573.80 seconds
> TestRunner_l2cap-tester PASS 20.80 seconds
> TestRunner_iso-tester PASS 26.49 seconds
> TestRunner_bnep-tester PASS 7.21 seconds
> TestRunner_mgmt-tester PASS 141.73 seconds
> TestRunner_rfcomm-tester PASS 11.55 seconds
> TestRunner_sco-tester PASS 10.92 seconds
> TestRunner_ioctl-tester PASS 12.47 seconds
> TestRunner_mesh-tester PASS 8.81 seconds
> TestRunner_smp-tester PASS 9.86 seconds
> TestRunner_userchan-tester PASS 7.63 seconds
> IncrementalBuild PASS 39.02 seconds
>
>
>
> ---
> Regards,
> Linux Bluetooth
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature
2023-04-19 15:24 [PATCH v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature Neeraj Sanjay Kale
2023-04-19 16:02 ` [v2] " bluez.test.bot
@ 2023-04-20 21:00 ` patchwork-bot+bluetooth
1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+bluetooth @ 2023-04-20 21:00 UTC (permalink / raw)
To: Neeraj sanjay kale
Cc: marcel, johan.hedberg, luiz.dentz, pmenzel, linux-kernel,
linux-bluetooth, amitkumar.karwar, rohit.fule, sherry.sun
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Wed, 19 Apr 2023 20:54:13 +0530 you wrote:
> This enables flow control before checking for bootloader signature and
> deciding whether FW download is needed or not. In case of V1 bootloader
> chips w8987 and w8997, it is observed that if WLAN FW is downloaded first
> and power save is enabled in wlan core, bootloader signatures are not
> emitted by the BT core when the chip is put to sleep. As a result, the
> driver skips FW download and subsequent HCI commands get timeout errors
> in dmesg as shown below:
>
> [...]
Here is the summary with links:
- [v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature
https://git.kernel.org/bluetooth/bluetooth-next/c/4b1f1ab59be1
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] 6+ messages in thread
end of thread, other threads:[~2023-04-20 21:00 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-19 15:24 [PATCH v2] Bluetooth: btnxpuart: Enable flow control before checking boot signature Neeraj Sanjay Kale
2023-04-19 16:02 ` [v2] " bluez.test.bot
2023-04-20 6:43 ` Neeraj sanjay kale
2023-04-20 21:00 ` [PATCH v2] " patchwork-bot+bluetooth
-- strict thread matches above, loose matches on Subject: below --
2023-04-19 14:23 Neeraj Sanjay Kale
2023-04-19 14:37 ` [v2] " bluez.test.bot
2023-04-19 21:18 ` Luiz Augusto von Dentz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox