From patchwork Mon Apr 16 06:40:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Pundir X-Patchwork-Id: 133433 Delivered-To: patch@linaro.org Received: by 10.46.84.18 with SMTP id i18csp3231676ljb; Sun, 15 Apr 2018 23:40:34 -0700 (PDT) X-Google-Smtp-Source: AIpwx481sxY8hs5u4bH8+svyHwJjP42ABn8W0gelXuV4T/Lv7LxAvpYaSlTCCHO1u/63yX4rKvMm X-Received: by 2002:a17:902:b105:: with SMTP id q5-v6mr14469822plr.173.1523860833899; Sun, 15 Apr 2018 23:40:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523860833; cv=none; d=google.com; s=arc-20160816; b=r8mODFZ4xu6DXxpmy6dJnXumbsnXiACy2KWoGyWtWCAXeDpoZEQPlakzLP8Hv25UyZ i+KcTenO1A0d8IsH3BYMuBNIzHo+a7FU9tzJE1a57AmVa2I6TFcQkPfXq4cW8PxCz1aQ iltPOs4vdE6MxN8eix1ZNxgIjtRl4XXN9G50DrY2pGWFMT0hRy/sqiPeTlHOSvNE1aeh ePiLAcT/7QgQcjuH9HFDbaICwGheHCNTKsKVPVmimOib1XNDlpl1BQgBYpj7a3GfDKpR uTa+ZaSCN1xyVLZGma9OH20pr0WXznv4R8/AY3DT/tgOtS6904AgJhmBt3U54ueS/lRi s0GA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:author:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=/2yx4ELcwl7HOar0oz7JanMSzAX7l5VBKt1bqqHdwBM=; b=j0fUOFsTCv5Qmv50o2TyaCV1XhLTbshTYHBFQx42ppfpIVXikim8lzRyfgUQFqyzub rK1DkvIc1SZcpHHI7K5nKOpE1sp05EPnS0v9w7JTqKntkbFClBF0EoHGPDxn2EEHs/8u QsJqUuAz9jUFklm48/aY5B7UmWw4a3u2Libr2gvfNSI+r+s4BSSOeq6d3OnTuiigXyoa jlUoN5c7Bug3GkE3Sy+L9KYNvZwTA9CxLgRoDGPljV0O39zvTPcDr2usVqllHlybW8Vp DVi6O8HCFUAnxhVP+fWDCOVlpAskyBdNsHtUPuoH+3/7L9ylBiTW/Ev86W044+pHz9Rw OcbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iWmStMTY; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si8648249pgv.483.2018.04.15.23.40.33; Sun, 15 Apr 2018 23:40:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iWmStMTY; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752497AbeDPGkc (ORCPT + 11 others); Mon, 16 Apr 2018 02:40:32 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38966 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751151AbeDPGkb (ORCPT ); Mon, 16 Apr 2018 02:40:31 -0400 Received: by mail-pg0-f65.google.com with SMTP id b9so3361593pgf.6 for ; Sun, 15 Apr 2018 23:40:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:author; bh=/2yx4ELcwl7HOar0oz7JanMSzAX7l5VBKt1bqqHdwBM=; b=iWmStMTYRmQmOETwPnKPZEB/SHRv4lfGbRJP2/9n6hzX1ybTar/hk9KfCEpNq2lWZC qY74BaZoQmJDY6N8SIzIey4NP0moe089Ac1blGcgj0gewkZo1qb6jKRR0QZy9Lz37r0n R9W5czQuCHPGWD3tiPJk0TLWiIgU28wc9g8tc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:author; bh=/2yx4ELcwl7HOar0oz7JanMSzAX7l5VBKt1bqqHdwBM=; b=fjpAvdBkVxooVOl0CQ01vJo7y4A090Y4bKIvi/WVqWz/cOLF1ffXQBsrpPRPQMVPtJ 2gZ3w/t8I+bqJatarLWcUDUJi5gX7t/TFFZ1a430+LAVGsK9i4Xexvz3An0OPlUuZJHR lbo6LzYKNAentUD5L8THcoyYVZQNoMmW3zTfKyivL8a8cLdCC1zBhETRFhxxyApntynr 8g25tVUtveKUOqHMbco0hd4X0oFBYO5vYT7UALjmMG27Lt9KBxS+5ROxjwJugdkKCA2A Q3N6PI9cHimxlcH7jj7o2ubzakwOT5LEY4vR1EqELNzStOU4tY8tBfQNA3dIoMy9iqL1 j9XA== X-Gm-Message-State: ALQs6tC+7MbQ8BNXJm/syOCavZl9urldFoq+RxeWM4CFucME/XdH9UH1 nZve029ug2eSuRz52ZjhtIGN+w== X-Received: by 10.101.101.132 with SMTP id u4mr12065251pgv.260.1523860830820; Sun, 15 Apr 2018 23:40:30 -0700 (PDT) Received: from localhost.localdomain ([106.51.17.69]) by smtp.gmail.com with ESMTPSA id h6sm21878223pgn.65.2018.04.15.23.40.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 15 Apr 2018 23:40:29 -0700 (PDT) From: Amit Pundir To: linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org Cc: dragonboard@lists.96boards.org, Loic Poulain , Nicolas Dechesne , Marcel Holtmann , Johan Hedberg , Stable Subject: [PATCH] Bluetooth: hci_qca: Avoid missing rampatch failure with userspace fw loader Date: Mon, 16 Apr 2018 12:10:24 +0530 Message-Id: <1523860824-3392-1-git-send-email-amit.pundir@linaro.org> X-Mailer: git-send-email 2.7.4 Author: Amit Pundir Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 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 CC: Nicolas Dechesne CC: Marcel Holtmann CC: Johan Hedberg CC: Stable Signed-off-by: Amit Pundir --- drivers/bluetooth/hci_qca.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.7.4 diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 05ec530b8a3a..330e9b29e145 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -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 */