From patchwork Mon Nov 6 11:16:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loic Poulain X-Patchwork-Id: 118018 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp2644216qgn; Mon, 6 Nov 2017 03:17:01 -0800 (PST) X-Google-Smtp-Source: ABhQp+Q1mmAL1GhUtBcb9OV8Hd4m5Twjaicq6/GXpcBJ7yQsg+uTDhfD4KxOu0TaWelkGGMLLIpc X-Received: by 10.84.248.135 with SMTP id q7mr14198944pll.79.1509967021661; Mon, 06 Nov 2017 03:17:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1509967021; cv=none; d=google.com; s=arc-20160816; b=Ye26MatUfPmXv+yH1sCZMdR/xOc0JGWbHTexuCRK7e069SBGjFSU4d1cpDfsXgVjiT I2GlWoF5BplAADqO6hU1ircbaZhJ/ysIRsD71DvzOCKRVsLBqzbq13LEwbsuZnXOuRhi 5vbb2XxJi5Jvzv8KcPaZbNmeJR2SYqGlaRvRxLyXS38b8z+guvcVSQo5LRb10MiOpkXG Y/39vYbW5H/IT2d6RQodIs7ElsK2tWfyvpByL2+fHbAXwBUf7qTTQxFsVpc82DQjTJTG 20Ex7kLJecs10C6/fj3R46xQtr1wXYxo8MoAzShFr7Hbh2THefK5ZgkQuYP3e6bkNZML YzkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=gRBoOONLwN7TYK0AiRRXDqRLCju7A0V/ukdF2t0oBnw=; b=prGICmmgsLVor2LPCzk3uKfV3YEH5+IZzzOySnD3vYoaxa+nyGo4ElS2Ul0KF89a5u aKH/06957rbzqjiA1b4FE4LMLvbshAfzHCwTCtfEI1hZ3EV/VIN+eh+9P44EfgaR23ki NhfQVWOjUbN5BpL8BcCqw6lzDsZeT3F5du82gZU+vSeqsJrIiYrunLuNt6ZLdq50ujHX YhU0MtHQ1VDFG8w+jK3M9IQgOvtczvc1SfURzUDn/tfB9mJQZ1KNZWEkt3l2+7yAa3f/ g7NkwxJpaAsVsp/nbCKOsLMVH6EsXXfMEZFWllQmKer9D4qF79pAE5et7awRvpA6Sr4r LV2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T8nzWxiR; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (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 o3si9214099pld.698.2017.11.06.03.17.01; Mon, 06 Nov 2017 03:17:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=T8nzWxiR; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751604AbdKFLRA (ORCPT + 1 other); Mon, 6 Nov 2017 06:17:00 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:46345 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbdKFLRA (ORCPT ); Mon, 6 Nov 2017 06:17:00 -0500 Received: by mail-wm0-f66.google.com with SMTP id r68so13022676wmr.1 for ; Mon, 06 Nov 2017 03:16:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=+F738CAFleEMgwhoTvBndaEsv4H2hiATZC55hJUcTmU=; b=T8nzWxiRXJr9AFZWi1myhG4owWW+zQZ1ymdjnFjdbmrYNJC7kgqKqHZS8cG0VZ4Erf R2ndZcRQGLx5oAJjq+n8n+meUODp7s+A3AuJQn46BQmz2hqBxYsswo8NYdH+43BDAhvB e16wgzzrbveckcOziAcUYW4lbDUr9+QCBzYY4= 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; bh=+F738CAFleEMgwhoTvBndaEsv4H2hiATZC55hJUcTmU=; b=R2nruFVRm+Z/VCUDF/xLX02amHq0TjFWQhg0QjGNNIbYnlhN1Zi3j3PeIC7NR2Dj1f qL2e/m5Do46YQwtNfsQUGcbbJjw1ZioIDsvDkhi3mrAeaBQdgX9GFXRZGrGfNnMbuAV7 UiMB9dL8oWGphH5JCwvv9wjMOXzMbNxsQ2FxAFzknenWmLyNV8Hk+oTfFDFoUHGVvM7V FRYkcAqHW0dRhzPkzZitUgMhYtp5TbAiJaBxIzO33ESWUYRBchxJHrfYO6eVsIAWToxL rK2H34dSdUwHud/Ebswrt4SMxu7h3nv9gu8vlDGAxpnxcyKxZwDWMNR6h9tH8Grnau02 lTGg== X-Gm-Message-State: AJaThX6wI1Br0mhNv5cI/Djr++evM0BLpJxw1W6dQ0Gz1neVOLA0AlE/ CxF1Bsg9+Q9/S36vyn4dFFsZVQ== X-Received: by 10.28.96.130 with SMTP id u124mr4908538wmb.121.1509967019021; Mon, 06 Nov 2017 03:16:59 -0800 (PST) Received: from localhost.localdomain (LFbn-1-10573-205.w90-89.abo.wanadoo.fr. [90.89.167.205]) by smtp.gmail.com with ESMTPSA id j17sm6006813wrc.21.2017.11.06.03.16.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Nov 2017 03:16:58 -0800 (PST) From: Loic Poulain To: marcel@holtmann.org, johan.hedberg@gmail.com Cc: linux-bluetooth@vger.kernel.org, Loic Poulain Subject: [PATCH] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Date: Mon, 6 Nov 2017 12:16:56 +0100 Message-Id: <1509967016-24224-1-git-send-email-loic.poulain@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org 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 --- drivers/bluetooth/hci_qca.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 */