* [PATCH 0/2] Bluetooth: hci_bcm4377 fixes
@ 2024-05-12 12:12 Sven Peter via B4 Relay
2024-05-12 12:12 ` [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout Sven Peter via B4 Relay
2024-05-12 12:12 ` [PATCH 2/2] Bluetooth: hci_bcm4377: Fix msgid release Sven Peter via B4 Relay
0 siblings, 2 replies; 7+ messages in thread
From: Sven Peter via B4 Relay @ 2024-05-12 12:12 UTC (permalink / raw)
To: Hector Martin, Alyssa Rosenzweig, Marcel Holtmann,
Luiz Augusto von Dentz
Cc: asahi, linux-arm-kernel, linux-bluetooth, linux-kernel,
Sven Peter, stable
Hi,
There are just two minor fixes from Hector that we've been carrying downstream
for a while now. One increases the timeout while waiting for the firmware to
boot which is optional for the controller already supported upstream but
required for a newer 4388 board for which we'll also submit support soon.
It also fixes the units for the timeouts which is why I've already included it
here. The other one fixes a call to bitmap_release_region where we only wanted
to release a single bit but are actually releasing much more.
Best,
Sven
Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
Hector Martin (2):
Bluetooth: hci_bcm4377: Increase boot timeout
Bluetooth: hci_bcm4377: Fix msgid release
drivers/bluetooth/hci_bcm4377.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
base-commit: cf87f46fd34d6c19283d9625a7822f20d90b64a4
change-id: 20240512-btfix-msgid-d76029a7d917
Best regards,
--
Sven Peter <sven@svenpeter.dev>
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout
2024-05-12 12:12 [PATCH 0/2] Bluetooth: hci_bcm4377 fixes Sven Peter via B4 Relay
@ 2024-05-12 12:12 ` Sven Peter via B4 Relay
2024-05-12 12:40 ` Bluetooth: hci_bcm4377 fixes bluez.test.bot
2024-05-12 12:54 ` [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout Stefan Wahren
2024-05-12 12:12 ` [PATCH 2/2] Bluetooth: hci_bcm4377: Fix msgid release Sven Peter via B4 Relay
1 sibling, 2 replies; 7+ messages in thread
From: Sven Peter via B4 Relay @ 2024-05-12 12:12 UTC (permalink / raw)
To: Hector Martin, Alyssa Rosenzweig, Marcel Holtmann,
Luiz Augusto von Dentz
Cc: asahi, linux-arm-kernel, linux-bluetooth, linux-kernel,
Sven Peter
From: Hector Martin <marcan@marcan.st>
BCM4388 takes over 2 seconds to boot, so increase the timeout (and also
fix the units while we're here).
Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
drivers/bluetooth/hci_bcm4377.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
index 9a7243d5db71..5b818a0e33d6 100644
--- a/drivers/bluetooth/hci_bcm4377.c
+++ b/drivers/bluetooth/hci_bcm4377.c
@@ -32,7 +32,8 @@ enum bcm4377_chip {
#define BCM4378_DEVICE_ID 0x5f69
#define BCM4387_DEVICE_ID 0x5f71
-#define BCM4377_TIMEOUT 1000
+#define BCM4377_TIMEOUT msecs_to_jiffies(1000)
+#define BCM4377_BOOT_TIMEOUT msecs_to_jiffies(5000)
/*
* These devices only support DMA transactions inside a 32bit window
@@ -1857,7 +1858,7 @@ static int bcm4377_boot(struct bcm4377_data *bcm4377)
dev_dbg(&bcm4377->pdev->dev, "waiting for firmware to boot\n");
ret = wait_for_completion_interruptible_timeout(&bcm4377->event,
- BCM4377_TIMEOUT);
+ BCM4377_BOOT_TIMEOUT);
if (ret == 0) {
ret = -ETIMEDOUT;
goto out_dma_free;
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* RE: Bluetooth: hci_bcm4377 fixes
2024-05-12 12:12 ` [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout Sven Peter via B4 Relay
@ 2024-05-12 12:40 ` bluez.test.bot
2024-05-12 12:54 ` [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout Stefan Wahren
1 sibling, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2024-05-12 12:40 UTC (permalink / raw)
To: linux-bluetooth, devnull+sven.svenpeter.dev
[-- Attachment #1: Type: text/plain, Size: 2747 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=852644
---Test result---
Test Summary:
CheckPatch PASS 2.17 seconds
GitLint PASS 0.57 seconds
SubjectPrefix PASS 0.24 seconds
BuildKernel PASS 29.49 seconds
CheckAllWarning PASS 32.65 seconds
CheckSparse PASS 38.17 seconds
CheckSmatch FAIL 35.96 seconds
BuildKernel32 PASS 28.86 seconds
TestRunnerSetup PASS 520.69 seconds
TestRunner_l2cap-tester PASS 20.60 seconds
TestRunner_iso-tester FAIL 33.71 seconds
TestRunner_bnep-tester PASS 4.75 seconds
TestRunner_mgmt-tester PASS 111.85 seconds
TestRunner_rfcomm-tester PASS 7.41 seconds
TestRunner_sco-tester PASS 15.02 seconds
TestRunner_ioctl-tester PASS 7.68 seconds
TestRunner_mesh-tester PASS 5.83 seconds
TestRunner_smp-tester PASS 6.83 seconds
TestRunner_userchan-tester PASS 4.91 seconds
IncrementalBuild PASS 32.02 seconds
Details
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bpa10x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bpa10x.o'
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 122, Passed: 121 (99.2%), Failed: 1, Not Run: 0
Failed Test Cases
ISO Connect2 Suspend - Success Failed 4.222 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout
2024-05-12 12:12 ` [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout Sven Peter via B4 Relay
2024-05-12 12:40 ` Bluetooth: hci_bcm4377 fixes bluez.test.bot
@ 2024-05-12 12:54 ` Stefan Wahren
1 sibling, 0 replies; 7+ messages in thread
From: Stefan Wahren @ 2024-05-12 12:54 UTC (permalink / raw)
To: sven, Hector Martin, Alyssa Rosenzweig, Marcel Holtmann,
Luiz Augusto von Dentz
Cc: asahi, linux-arm-kernel, linux-bluetooth, linux-kernel
Hi Sven,
Am 12.05.24 um 14:12 schrieb Sven Peter via B4 Relay:
> From: Hector Martin <marcan@marcan.st>
>
> BCM4388 takes over 2 seconds to boot, so increase the timeout (and also
> fix the units while we're here).
>
> Signed-off-by: Hector Martin <marcan@marcan.st>
> Reviewed-by: Sven Peter <sven@svenpeter.dev>
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
> drivers/bluetooth/hci_bcm4377.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
> index 9a7243d5db71..5b818a0e33d6 100644
> --- a/drivers/bluetooth/hci_bcm4377.c
> +++ b/drivers/bluetooth/hci_bcm4377.c
> @@ -32,7 +32,8 @@ enum bcm4377_chip {
> #define BCM4378_DEVICE_ID 0x5f69
> #define BCM4387_DEVICE_ID 0x5f71
>
> -#define BCM4377_TIMEOUT 1000
> +#define BCM4377_TIMEOUT msecs_to_jiffies(1000)
this change affect all timeouts not just the boot timeout, so i would
prefer to split this.
> +#define BCM4377_BOOT_TIMEOUT msecs_to_jiffies(5000)
>
> /*
> * These devices only support DMA transactions inside a 32bit window
> @@ -1857,7 +1858,7 @@ static int bcm4377_boot(struct bcm4377_data *bcm4377)
> dev_dbg(&bcm4377->pdev->dev, "waiting for firmware to boot\n");
>
> ret = wait_for_completion_interruptible_timeout(&bcm4377->event,
> - BCM4377_TIMEOUT);
> + BCM4377_BOOT_TIMEOUT);
> if (ret == 0) {
> ret = -ETIMEDOUT;
> goto out_dma_free;
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] Bluetooth: hci_bcm4377: Fix msgid release
2024-05-12 12:12 [PATCH 0/2] Bluetooth: hci_bcm4377 fixes Sven Peter via B4 Relay
2024-05-12 12:12 ` [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout Sven Peter via B4 Relay
@ 2024-05-12 12:12 ` Sven Peter via B4 Relay
2024-05-14 1:15 ` Neal Gompa
1 sibling, 1 reply; 7+ messages in thread
From: Sven Peter via B4 Relay @ 2024-05-12 12:12 UTC (permalink / raw)
To: Hector Martin, Alyssa Rosenzweig, Marcel Holtmann,
Luiz Augusto von Dentz
Cc: asahi, linux-arm-kernel, linux-bluetooth, linux-kernel,
Sven Peter, stable
From: Hector Martin <marcan@marcan.st>
We are releasing a single msgid, so the order argument to
bitmap_release_region must be zero.
Fixes: 8a06127602de ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards")
Cc: stable@vger.kernel.org
Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Sven Peter <sven@svenpeter.dev>
Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
drivers/bluetooth/hci_bcm4377.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
index 5b818a0e33d6..92d734f02e00 100644
--- a/drivers/bluetooth/hci_bcm4377.c
+++ b/drivers/bluetooth/hci_bcm4377.c
@@ -717,7 +717,7 @@ static void bcm4377_handle_ack(struct bcm4377_data *bcm4377,
ring->events[msgid] = NULL;
}
- bitmap_release_region(ring->msgids, msgid, ring->n_entries);
+ bitmap_release_region(ring->msgids, msgid, 0);
unlock:
spin_unlock_irqrestore(&ring->lock, flags);
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 2/2] Bluetooth: hci_bcm4377: Fix msgid release
2024-05-12 12:12 ` [PATCH 2/2] Bluetooth: hci_bcm4377: Fix msgid release Sven Peter via B4 Relay
@ 2024-05-14 1:15 ` Neal Gompa
0 siblings, 0 replies; 7+ messages in thread
From: Neal Gompa @ 2024-05-14 1:15 UTC (permalink / raw)
To: sven
Cc: Hector Martin, Alyssa Rosenzweig, Marcel Holtmann,
Luiz Augusto von Dentz, asahi, linux-arm-kernel, linux-bluetooth,
linux-kernel, stable
On Sun, May 12, 2024 at 6:12 AM Sven Peter via B4 Relay
<devnull+sven.svenpeter.dev@kernel.org> wrote:
>
> From: Hector Martin <marcan@marcan.st>
>
> We are releasing a single msgid, so the order argument to
> bitmap_release_region must be zero.
>
> Fixes: 8a06127602de ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards")
> Cc: stable@vger.kernel.org
> Signed-off-by: Hector Martin <marcan@marcan.st>
> Reviewed-by: Sven Peter <sven@svenpeter.dev>
> Signed-off-by: Sven Peter <sven@svenpeter.dev>
> ---
> drivers/bluetooth/hci_bcm4377.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
> index 5b818a0e33d6..92d734f02e00 100644
> --- a/drivers/bluetooth/hci_bcm4377.c
> +++ b/drivers/bluetooth/hci_bcm4377.c
> @@ -717,7 +717,7 @@ static void bcm4377_handle_ack(struct bcm4377_data *bcm4377,
> ring->events[msgid] = NULL;
> }
>
> - bitmap_release_region(ring->msgids, msgid, ring->n_entries);
> + bitmap_release_region(ring->msgids, msgid, 0);
>
> unlock:
> spin_unlock_irqrestore(&ring->lock, flags);
>
> --
> 2.34.1
Reviewed-by: Neal Gompa <neal@gompa.dev>
--
真実はいつも一つ!/ Always, there's only one truth!
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 1/3] Bluetooth: hci_bcm4377: Use correct unit for timeouts
@ 2024-05-15 18:15 Sven Peter via B4 Relay
2024-05-15 18:59 ` Bluetooth: hci_bcm4377 fixes bluez.test.bot
0 siblings, 1 reply; 7+ messages in thread
From: Sven Peter via B4 Relay @ 2024-05-15 18:15 UTC (permalink / raw)
To: Hector Martin, Alyssa Rosenzweig, Marcel Holtmann,
Luiz Augusto von Dentz
Cc: asahi, linux-arm-kernel, linux-bluetooth, linux-kernel,
Sven Peter
From: Sven Peter <sven@svenpeter.dev>
BCM4377_TIMEOUT is always used to wait for completitions and their API
expects a timeout in jiffies instead of msecs.
Fixes: 8a06127602de ("Bluetooth: hci_bcm4377: Add new driver for BCM4377 PCIe boards")
Signed-off-by: Sven Peter <sven@svenpeter.dev>
---
drivers/bluetooth/hci_bcm4377.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_bcm4377.c b/drivers/bluetooth/hci_bcm4377.c
index 9a7243d5db71..caf9b64c8111 100644
--- a/drivers/bluetooth/hci_bcm4377.c
+++ b/drivers/bluetooth/hci_bcm4377.c
@@ -32,7 +32,7 @@ enum bcm4377_chip {
#define BCM4378_DEVICE_ID 0x5f69
#define BCM4387_DEVICE_ID 0x5f71
-#define BCM4377_TIMEOUT 1000
+#define BCM4377_TIMEOUT msecs_to_jiffies(1000)
/*
* These devices only support DMA transactions inside a 32bit window
--
2.34.1
^ permalink raw reply related [flat|nested] 7+ messages in thread* RE: Bluetooth: hci_bcm4377 fixes
2024-05-15 18:15 [PATCH v2 1/3] Bluetooth: hci_bcm4377: Use correct unit for timeouts Sven Peter via B4 Relay
@ 2024-05-15 18:59 ` bluez.test.bot
0 siblings, 0 replies; 7+ messages in thread
From: bluez.test.bot @ 2024-05-15 18:59 UTC (permalink / raw)
To: linux-bluetooth, devnull+sven.svenpeter.dev
[-- Attachment #1: Type: text/plain, Size: 2829 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=853487
---Test result---
Test Summary:
CheckPatch PASS 1.37 seconds
GitLint PASS 0.56 seconds
SubjectPrefix PASS 0.16 seconds
BuildKernel PASS 30.43 seconds
CheckAllWarning PASS 32.81 seconds
CheckSparse PASS 39.27 seconds
CheckSmatch FAIL 37.98 seconds
BuildKernel32 PASS 29.23 seconds
TestRunnerSetup PASS 530.30 seconds
TestRunner_l2cap-tester PASS 20.59 seconds
TestRunner_iso-tester PASS 28.30 seconds
TestRunner_bnep-tester PASS 4.66 seconds
TestRunner_mgmt-tester FAIL 111.38 seconds
TestRunner_rfcomm-tester PASS 7.42 seconds
TestRunner_sco-tester PASS 14.99 seconds
TestRunner_ioctl-tester PASS 7.81 seconds
TestRunner_mesh-tester PASS 6.05 seconds
TestRunner_smp-tester PASS 6.95 seconds
TestRunner_userchan-tester PASS 5.05 seconds
IncrementalBuild PASS 39.84 seconds
Details
##############################
Test: CheckSmatch - FAIL
Desc: Run smatch tool with source
Output:
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: net/bluetooth/hci_core.o] Error 139
make[4]: *** Deleting file 'net/bluetooth/hci_core.o'
make[3]: *** [scripts/Makefile.build:485: net/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: net] Error 2
make[2]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bcm203x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bcm203x.o'
make[4]: *** Waiting for unfinished jobs....
Segmentation fault (core dumped)
make[4]: *** [scripts/Makefile.build:244: drivers/bluetooth/bpa10x.o] Error 139
make[4]: *** Deleting file 'drivers/bluetooth/bpa10x.o'
make[3]: *** [scripts/Makefile.build:485: drivers/bluetooth] Error 2
make[2]: *** [scripts/Makefile.build:485: drivers] Error 2
make[1]: *** [/github/workspace/src/src/Makefile:1919: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 488 (99.2%), Failed: 2, Not Run: 2
Failed Test Cases
LL Privacy - Add Device 6 (RL is full) Failed 0.197 seconds
LL Privacy - Remove Device 4 (Disable Adv) Timed out 2.571 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-05-15 18:59 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-12 12:12 [PATCH 0/2] Bluetooth: hci_bcm4377 fixes Sven Peter via B4 Relay
2024-05-12 12:12 ` [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout Sven Peter via B4 Relay
2024-05-12 12:40 ` Bluetooth: hci_bcm4377 fixes bluez.test.bot
2024-05-12 12:54 ` [PATCH 1/2] Bluetooth: hci_bcm4377: Increase boot timeout Stefan Wahren
2024-05-12 12:12 ` [PATCH 2/2] Bluetooth: hci_bcm4377: Fix msgid release Sven Peter via B4 Relay
2024-05-14 1:15 ` Neal Gompa
-- strict thread matches above, loose matches on Subject: below --
2024-05-15 18:15 [PATCH v2 1/3] Bluetooth: hci_bcm4377: Use correct unit for timeouts Sven Peter via B4 Relay
2024-05-15 18:59 ` Bluetooth: hci_bcm4377 fixes bluez.test.bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox