* [PATCH] Bluetooth: hci_qca: Avoid setup failure on missing rampatch
@ 2017-11-06 11:16 Loic Poulain
2017-11-06 13:51 ` Marcel Holtmann
0 siblings, 1 reply; 2+ messages in thread
From: Loic Poulain @ 2017-11-06 11:16 UTC (permalink / raw)
To: marcel, johan.hedberg; +Cc: linux-bluetooth, Loic Poulain
Assuming that the original code idea was to enable in-band sleeping
only if the setup_rome method returns succes and run in 'standard'
mode otherwise, we should not return setup_rome return value which
makes qca_setup fail if no rampatch/nvm file found.
This fixes BT issue on the dragonboard-820C p4 which includes the
following QCA controller:
hci0: Product:0x00000008
hci0: Patch :0x00000111
hci0: ROM :0x00000302
hci0: SOC :0x00000044
Since there is no rampatch for this controller revision, just make
it work as is.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
---
drivers/bluetooth/hci_qca.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index bbd7db7..05ec530 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -932,6 +932,9 @@ static int qca_setup(struct hci_uart *hu)
if (!ret) {
set_bit(STATE_IN_BAND_SLEEP_ENABLED, &qca->flags);
qca_debugfs_init(hdev);
+ } else if (ret == -ENOENT) {
+ /* No patch/nvm-config found, run with original fw/config */
+ ret = 0;
}
/* Setup bdaddr */
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Bluetooth: hci_qca: Avoid setup failure on missing rampatch
2017-11-06 11:16 [PATCH] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Loic Poulain
@ 2017-11-06 13:51 ` Marcel Holtmann
0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2017-11-06 13:51 UTC (permalink / raw)
To: Loic Poulain; +Cc: Johan Hedberg, linux-bluetooth
Hi Loic,
> Assuming that the original code idea was to enable in-band sleeping
> only if the setup_rome method returns succes and run in 'standard'
> mode otherwise, we should not return setup_rome return value which
> makes qca_setup fail if no rampatch/nvm file found.
>
> This fixes BT issue on the dragonboard-820C p4 which includes the
> following QCA controller:
> hci0: Product:0x00000008
> hci0: Patch :0x00000111
> hci0: ROM :0x00000302
> hci0: SOC :0x00000044
>
> Since there is no rampatch for this controller revision, just make
> it work as is.
>
> Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
> ---
> drivers/bluetooth/hci_qca.c | 3 +++
> 1 file changed, 3 insertions(+)
patch has been applied to bluetooth-next tree.
Regards
Marcel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-06 13:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06 11:16 [PATCH] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Loic Poulain
2017-11-06 13:51 ` Marcel Holtmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.