]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/4.14.53/bluetooth-hci_qca-avoid-missing-rampatch-failure-with-userspace-fw-loader.patch
Linux 5.1.4
[thirdparty/kernel/stable-queue.git] / releases / 4.14.53 / bluetooth-hci_qca-avoid-missing-rampatch-failure-with-userspace-fw-loader.patch
CommitLineData
d1cf1a50
GKH
1From 7dc5fe0814c35ec4e7d2e8fa30abab72e0e6a172 Mon Sep 17 00:00:00 2001
2From: Amit Pundir <amit.pundir@linaro.org>
3Date: Mon, 16 Apr 2018 12:10:24 +0530
4Subject: Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader
5
6From: Amit Pundir <amit.pundir@linaro.org>
7
8commit 7dc5fe0814c35ec4e7d2e8fa30abab72e0e6a172 upstream.
9
10AOSP use userspace firmware loader to load firmwares, which will
11return -EAGAIN in case qca/rampatch_00440302.bin is not found.
12Since there is no rampatch for dragonboard820c QCA controller
13revision, just make it work as is.
14
15CC: Loic Poulain <loic.poulain@linaro.org>
16CC: Nicolas Dechesne <nicolas.dechesne@linaro.org>
17CC: Marcel Holtmann <marcel@holtmann.org>
18CC: Johan Hedberg <johan.hedberg@gmail.com>
19CC: Stable <stable@vger.kernel.org>
20Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
21Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
22Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
23
24---
25 drivers/bluetooth/hci_qca.c | 6 ++++++
26 1 file changed, 6 insertions(+)
27
28--- a/drivers/bluetooth/hci_qca.c
29+++ b/drivers/bluetooth/hci_qca.c
30@@ -936,6 +936,12 @@ static int qca_setup(struct hci_uart *hu
31 } else if (ret == -ENOENT) {
32 /* No patch/nvm-config found, run with original fw/config */
33 ret = 0;
34+ } else if (ret == -EAGAIN) {
35+ /*
36+ * Userspace firmware loader will return -EAGAIN in case no
37+ * patch/nvm-config is found, so run with original fw/config.
38+ */
39+ ret = 0;
40 }
41
42 /* Setup bdaddr */