OSDN Git Service

Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader
authorAmit Pundir <amit.pundir@linaro.org>
Mon, 16 Apr 2018 06:40:24 +0000 (12:10 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Fri, 18 May 2018 04:37:50 +0000 (06:37 +0200)
AOSP use userspace firmware loader to load firmwares, which will
return -EAGAIN in case qca/rampatch_00440302.bin is not found.
Since there is no rampatch for dragonboard820c QCA controller
revision, just make it work as is.

CC: Loic Poulain <loic.poulain@linaro.org>
CC: Nicolas Dechesne <nicolas.dechesne@linaro.org>
CC: Marcel Holtmann <marcel@holtmann.org>
CC: Johan Hedberg <johan.hedberg@gmail.com>
CC: Stable <stable@vger.kernel.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_qca.c

index 05ec530..330e9b2 100644 (file)
@@ -935,6 +935,12 @@ static int qca_setup(struct hci_uart *hu)
        } else if (ret == -ENOENT) {
                /* No patch/nvm-config found, run with original fw/config */
                ret = 0;
+       } else if (ret == -EAGAIN) {
+               /*
+                * Userspace firmware loader will return -EAGAIN in case no
+                * patch/nvm-config is found, so run with original fw/config.
+                */
+               ret = 0;
        }
 
        /* Setup bdaddr */