From patchwork Thu Mar 8 04:57:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130958 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp6117338lja; Wed, 7 Mar 2018 22:52:36 -0800 (PST) X-Google-Smtp-Source: AG47ELt7nw6/h2VvzGaRAkhVC9f+zqV3KkTlBgJaGZxRRtj5FXuemzb9FILN/N/Pg7OOHGPvKxXK X-Received: by 2002:a17:902:b101:: with SMTP id q1-v6mr23177015plr.287.1520491956384; Wed, 07 Mar 2018 22:52:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520491956; cv=none; d=google.com; s=arc-20160816; b=Vi9NXev8qL0C1plaEQgCgWC2Fg5WaDhncWzj+Yi53lx35scpZwA1CEtFzoxCem6apT MY2e6YPkKXxNfvOJ9h1f2tcmhw23LfF9rQYSBN+4Ta5wCqvxmOQCX16CAIffXvUWp6e8 4kKe0HQkBaYgavCqw3TvRDRPpqct89ojvOYb4nwXlMGzebWOiHDMXfVjIFS3NtSLw6Ms eCqXHIrz6KLgIFTgbLc76KHoSCbMVxhdXo9+icre6llSloGQnsynI8cjqfsLK32HdTgG 4Zz6rCo3ftQQLDxb+JTfFi5HEbVILwJZyHRwmItp4LzoOCIs+4RYMXGqklTsXfqxoKzs xp1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:message-id:date:thread-index:thread-topic:subject :cc:to:from:dkim-signature:arc-authentication-results; bh=ibxZ/A1vRk5ZdYwWOH0g3r7FtKrkwanG/yCsiuWOqbU=; b=aC9ihqCWIxLQvopmlG6LcNjmBjCbCXyyDkB4NI9jJnOHWobGKODRBb+WK/yBva2HR4 Yq2Jzw8bj1OiqenZxmkhm5KvwIeJjqJVdtbwRO320GqD5qJSB1pEPDk6XGG0OwrOWEFe QpZIK6u7W9v8sij+gUeplfNjj35iDFD0Ca/JbEAIdF72yoYXVQdIkJB9rXNFqHyeNgEx C0l8qQQoJmIPKKWHsKPQkvdkujEABHceDqqKeSQRF6Sx4ddnzBT9mp75t2iCG8RdFHu2 UGxATI3HqXNsnGeOAq7HjqQc94cSe63FD1kHy2xW/10j7U/i4f9G1Wdo0PAkqQxQquDE EQnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=jVDvxt/a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c2-v6si9905358pli.388.2018.03.07.22.52.35; Wed, 07 Mar 2018 22:52:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@microsoft.com header.s=selector1 header.b=jVDvxt/a; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965517AbeCHGvZ (ORCPT + 28 others); Thu, 8 Mar 2018 01:51:25 -0500 Received: from mail-sn1nam02on0119.outbound.protection.outlook.com ([104.47.36.119]:48736 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S935223AbeCHE6J (ORCPT ); Wed, 7 Mar 2018 23:58:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=ibxZ/A1vRk5ZdYwWOH0g3r7FtKrkwanG/yCsiuWOqbU=; b=jVDvxt/ag8sepRo1EFuDlC3m8Fm/hr4Xy1aLlyUPKzp1NR41R+1FMqHTDBuMjJQbMPIaWVHbFmqScMbGqpE7/jPQOybJ4qlNHm6BZR1l+QZvjMQno4yansBzUCmWR/lWLWD23t8BOg5Agep1j9iVpVvo7S3eiV0mXDj8zBSwv84= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0936.namprd21.prod.outlook.com (52.132.131.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.588.3; Thu, 8 Mar 2018 04:58:02 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8063:c68a:b210:7446%2]) with mapi id 15.20.0588.008; Thu, 8 Mar 2018 04:58:02 +0000 From: Sasha Levin To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" CC: Loic Poulain , Marcel Holtmann , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 01/67] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Thread-Topic: [PATCH AUTOSEL for 4.14 01/67] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Thread-Index: AQHTtpn32kyTTqIXREy0QBJ0JmxEJA== Date: Thu, 8 Mar 2018 04:57:31 +0000 Message-ID: <20180308045641.7814-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DM5PR2101MB0936; 7:tT6Zvb9166DUefR+mVRXQTSh7JbNMY4RDLZfLOEOhEsQAs1m4cY6zHrcVt8b9ruvjoZwf91WxbLVOK4Aovi5EAxg607H61jZ9GIbx1DtGy57b2IPzXU54K46v1/fntwbNonGnYW4EnPUN0JNUZWpbaB/kpfLGcs2478dIY94j2ZQLzoVJb8zHMRDJgoEtjH4UdLXSOTLol3tkTYsrQFU3dFReZe23xNoQjCrwWHtV3JG4O0ykTRBKZgwqr+B/h+Q; 20:0RpyGHNnNpzc8di4Uae4Xds9NeDvfZqYMsMurBvc6ctVRxhQvXmuqVmYarccueB9qlQk8OIhWMC8LerC8Dq6jPwju09WkYmern1QQSoMcW/mXlvGD17H/QUFrKnF8ia7gctIGTWpaKx/mSS1WetUo9Z9ICvhFvwzF6bOUS8zF3Y= x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: d125231f-5e04-4f9d-c4e4-08d584b12bd9 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0936; x-ms-traffictypediagnostic: DM5PR2101MB0936: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(61425038)(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231220)(944501244)(52105095)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041288)(20161123558120)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:DM5PR2101MB0936; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0936; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(366004)(396003)(39860400002)(39380400002)(346002)(376002)(199004)(189003)(478600001)(99286004)(575784001)(6506007)(3660700001)(36756003)(86362001)(54906003)(6116002)(110136005)(102836004)(1076002)(3846002)(6486002)(3280700002)(10090500001)(10290500003)(305945005)(72206003)(6436002)(6666003)(26005)(5250100002)(2906002)(186003)(2501003)(105586002)(66066001)(7736002)(68736007)(25786009)(6512007)(106356001)(86612001)(8936002)(107886003)(81166006)(2900100001)(5660300001)(4326008)(81156014)(53936002)(14454004)(97736004)(316002)(22452003)(8676002)(22906009)(217873001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0936; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: xg/Ev9FhAvBwOnmf4CMjU8DjtiAmwKAJk2Fl63Rp4GWH/iU7zggSgJetiDaLhGgCttlkSOSwNu0jDsIQoZ3gCqFisIiQKDqj2M9Slas9/r5JDOwWFXwTkuc1EH20xoae30tGKHVfu9kbk+u6TOAGewc9kg6j+hnZYQHe3WWZacNUF6JMvus8qXS7++YSTFVMasjBVAHT4xyNrZQcq5M3zrc3lt/RbTpoecjo5uigfCRF8pjOFuU7lvqSPb/HkEgJlyKVwKfaET9VClLrBhb785lCqz2X+wHCRpScH5gUS7axeLrbuIsU+qpTEPrtTL1GRBj+i8yFp4fny1IAPKdCOA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: d125231f-5e04-4f9d-c4e4-08d584b12bd9 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:57:31.8420 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0936 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Loic Poulain [ Upstream commit ba8f3597900291a93604643017fff66a14546015 ] 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 Signed-off-by: Marcel Holtmann Signed-off-by: Sasha Levin --- drivers/bluetooth/hci_qca.c | 3 +++ 1 file changed, 3 insertions(+) -- 2.14.1 diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 392f412b4575..c9f0ac083a3e 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -933,6 +933,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 */