* [PATCH] Bluetooth: hci_bcm: do not mark valid bd_addr as invalid
@ 2023-06-02 8:19 ` Johan Hovold
2023-06-02 8:47 ` Marek Szyprowski
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Johan Hovold @ 2023-06-02 8:19 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz
Cc: Matthias Kaehlcke, linux-bluetooth, linux-kernel, Johan Hovold,
Marek Szyprowski
A recent commit restored the original (and still documented) semantics
for the HCI_QUIRK_USE_BDADDR_PROPERTY quirk so that the device address
is considered invalid unless an address is provided by firmware.
This specifically means that this flag must only be set for devices with
invalid addresses, but the Broadcom driver has so far been setting this
flag unconditionally.
Fortunately the driver already checks for invalid addresses during setup
and sets the HCI_QUIRK_INVALID_BDADDR flag. Use this flag to indicate
when the address can be overridden by firmware (long term, this should
probably just always be allowed).
Fixes: 6ac517d8cf8b ("Bluetooth: fix use-bdaddr-property quirk")
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/lkml/ecef83c8-497f-4011-607b-a63c24764867@samsung.com
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
drivers/bluetooth/hci_bcm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
index 83bf5d4330c4..874d23089b39 100644
--- a/drivers/bluetooth/hci_bcm.c
+++ b/drivers/bluetooth/hci_bcm.c
@@ -643,7 +643,8 @@ static int bcm_setup(struct hci_uart *hu)
* Allow the bootloader to set a valid address through the
* device tree.
*/
- set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hu->hdev->quirks);
+ if (test_bit(HCI_QUIRK_INVALID_BDADDR, &hu->hdev->quirks))
+ set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hu->hdev->quirks);
if (!bcm_request_irq(bcm))
err = bcm_setup_sleep(hu);
--
2.39.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Bluetooth: hci_bcm: do not mark valid bd_addr as invalid
2023-06-02 8:19 ` [PATCH] Bluetooth: hci_bcm: do not mark valid bd_addr as invalid Johan Hovold
@ 2023-06-02 8:47 ` Marek Szyprowski
2023-06-02 8:58 ` bluez.test.bot
2023-06-02 20:30 ` [PATCH] " patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: Marek Szyprowski @ 2023-06-02 8:47 UTC (permalink / raw)
To: Johan Hovold, Marcel Holtmann, Johan Hedberg,
Luiz Augusto von Dentz
Cc: Matthias Kaehlcke, linux-bluetooth, linux-kernel
On 02.06.2023 10:19, Johan Hovold wrote:
> A recent commit restored the original (and still documented) semantics
> for the HCI_QUIRK_USE_BDADDR_PROPERTY quirk so that the device address
> is considered invalid unless an address is provided by firmware.
>
> This specifically means that this flag must only be set for devices with
> invalid addresses, but the Broadcom driver has so far been setting this
> flag unconditionally.
>
> Fortunately the driver already checks for invalid addresses during setup
> and sets the HCI_QUIRK_INVALID_BDADDR flag. Use this flag to indicate
> when the address can be overridden by firmware (long term, this should
> probably just always be allowed).
>
> Fixes: 6ac517d8cf8b ("Bluetooth: fix use-bdaddr-property quirk")
> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Link: https://lore.kernel.org/lkml/ecef83c8-497f-4011-607b-a63c24764867@samsung.com
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> drivers/bluetooth/hci_bcm.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/hci_bcm.c b/drivers/bluetooth/hci_bcm.c
> index 83bf5d4330c4..874d23089b39 100644
> --- a/drivers/bluetooth/hci_bcm.c
> +++ b/drivers/bluetooth/hci_bcm.c
> @@ -643,7 +643,8 @@ static int bcm_setup(struct hci_uart *hu)
> * Allow the bootloader to set a valid address through the
> * device tree.
> */
> - set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hu->hdev->quirks);
> + if (test_bit(HCI_QUIRK_INVALID_BDADDR, &hu->hdev->quirks))
> + set_bit(HCI_QUIRK_USE_BDADDR_PROPERTY, &hu->hdev->quirks);
>
> if (!bcm_request_irq(bcm))
> err = bcm_setup_sleep(hu);
Best regards
--
Marek Szyprowski, PhD
Samsung R&D Institute Poland
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Bluetooth: hci_bcm: do not mark valid bd_addr as invalid
2023-06-02 8:19 ` [PATCH] Bluetooth: hci_bcm: do not mark valid bd_addr as invalid Johan Hovold
2023-06-02 8:47 ` Marek Szyprowski
@ 2023-06-02 8:58 ` bluez.test.bot
2023-06-02 20:30 ` [PATCH] " patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2023-06-02 8:58 UTC (permalink / raw)
To: linux-bluetooth, johan+linaro
[-- Attachment #1: Type: text/plain, Size: 2635 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=753409
---Test result---
Test Summary:
CheckPatch PASS 0.64 seconds
GitLint FAIL 0.56 seconds
SubjectPrefix PASS 0.11 seconds
BuildKernel PASS 34.01 seconds
CheckAllWarning PASS 36.62 seconds
CheckSparse PASS 42.25 seconds
CheckSmatch PASS 113.68 seconds
BuildKernel32 PASS 33.90 seconds
TestRunnerSetup PASS 474.42 seconds
TestRunner_l2cap-tester PASS 17.53 seconds
TestRunner_iso-tester FAIL 24.51 seconds
TestRunner_bnep-tester PASS 5.85 seconds
TestRunner_mgmt-tester PASS 119.90 seconds
TestRunner_rfcomm-tester PASS 9.36 seconds
TestRunner_sco-tester PASS 8.66 seconds
TestRunner_ioctl-tester PASS 10.27 seconds
TestRunner_mesh-tester PASS 7.43 seconds
TestRunner_smp-tester PASS 8.53 seconds
TestRunner_userchan-tester PASS 6.13 seconds
IncrementalBuild PASS 32.26 seconds
Details
##############################
Test: GitLint - FAIL
Desc: Run gitlint
Output:
Bluetooth: hci_bcm: do not mark valid bd_addr as invalid
WARNING: I3 - ignore-body-lines: gitlint will be switching from using Python regex 'match' (match beginning) to 'search' (match anywhere) semantics. Please review your ignore-body-lines.regex option accordingly. To remove this warning, set general.regex-style-search=True. More details: https://jorisroovers.github.io/gitlint/configuration/#regex-style-search
17: B1 Line exceeds max length (83>80): "Link: https://lore.kernel.org/lkml/ecef83c8-497f-4011-607b-a63c24764867@samsung.com"
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
Total: 80, Passed: 75 (93.8%), Failed: 5, Not Run: 0
Failed Test Cases
ISO AC 6(i) - Success Failed 0.238 seconds
ISO AC 7(i) - Success Failed 0.234 seconds
ISO AC 8(i) - Success Failed 0.232 seconds
ISO AC 9(i) - Success Failed 0.235 seconds
ISO AC 11(i) - Success Failed 0.243 seconds
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Bluetooth: hci_bcm: do not mark valid bd_addr as invalid
2023-06-02 8:19 ` [PATCH] Bluetooth: hci_bcm: do not mark valid bd_addr as invalid Johan Hovold
2023-06-02 8:47 ` Marek Szyprowski
2023-06-02 8:58 ` bluez.test.bot
@ 2023-06-02 20:30 ` patchwork-bot+bluetooth
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2023-06-02 20:30 UTC (permalink / raw)
To: Johan Hovold
Cc: marcel, johan.hedberg, luiz.dentz, mka, linux-bluetooth,
linux-kernel, m.szyprowski
Hello:
This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:
On Fri, 2 Jun 2023 10:19:12 +0200 you wrote:
> A recent commit restored the original (and still documented) semantics
> for the HCI_QUIRK_USE_BDADDR_PROPERTY quirk so that the device address
> is considered invalid unless an address is provided by firmware.
>
> This specifically means that this flag must only be set for devices with
> invalid addresses, but the Broadcom driver has so far been setting this
> flag unconditionally.
>
> [...]
Here is the summary with links:
- Bluetooth: hci_bcm: do not mark valid bd_addr as invalid
https://git.kernel.org/bluetooth/bluetooth-next/c/758be2398ff6
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] 4+ messages in thread
end of thread, other threads:[~2023-06-02 20:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20230602081950eucas1p22a82f91f361fb64e23ecddada3173534@eucas1p2.samsung.com>
2023-06-02 8:19 ` [PATCH] Bluetooth: hci_bcm: do not mark valid bd_addr as invalid Johan Hovold
2023-06-02 8:47 ` Marek Szyprowski
2023-06-02 8:58 ` bluez.test.bot
2023-06-02 20:30 ` [PATCH] " patchwork-bot+bluetooth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox