From patchwork Thu Mar 8 04:56:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 130965 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp6135518lja; Wed, 7 Mar 2018 23:13:16 -0800 (PST) X-Google-Smtp-Source: AG47ELuhnoyd/Hpvon64aYix1yP51qgVpghW7KvoOc48PZnUMsJDkK14FFtOuOeLR3RYX8gnM/mc X-Received: by 10.99.97.205 with SMTP id v196mr20300304pgb.319.1520493196846; Wed, 07 Mar 2018 23:13:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520493196; cv=none; d=google.com; s=arc-20160816; b=WgeljKC0XP9jvAPBf+DjP9bxC3AuynfR1zNorvw9EKoj7C5zh3QRLaCwt3IOcF9Smf HoJc4MXf9MAvI9L6z0uuTOwNSgMTrJiYQPd2/AVwHhxHvd0QsgJaUKWK9hmnz4skbzJ3 d0IEKRAVNHfvQVsPyJyAIXGEicUVh69K6Vk+gTKq0X69VNf8nvRSUI/9y9eamTpdX9DG ldOQSmX2JrZlS8TMah2pWYCnJPMgjyPjFqMeh8jgivvdeOn2iAxqh6xc6fgKpYU0dPp1 r0m2wnkWvV6I5k2mFzuY9qcXu6bTmme0nMhiO6rdHffUWgCEbsjgpyrP7Y6RoEa13Gk8 DgbQ== 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:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=QmuKJQ4uPuvB8JN6rSUc3duFC5kHyqvJSap6ury9A9Y=; b=KCPQZy49TjH4G6829IGfUemMKqJptdjv6tG/v/0fHswGfJAS4PmA/so2GudUCWPB8r BOPzU/hkipYplItJIj3R0gyM0VwrNv7Gx0l1EEAzFhtMUZyCEwc+nq9b2v3DPL6WWhf4 ya5D5uaOZ+7ASfpvib7Siz52FiMWmpfT1JvNlhVxUfg0CI3NGVVKeVKaCPTMy0scpgxy 0lQP8meCKiVzh8oBdaRvSEh5Wr6as5nzLhvQcBsftcTjyobc5swTtKy0IJs3+vsWC79C X0lEGI7dQr4Fv6fXMb/OcDzC01vKmB+T8uRNPdD184vQoSuYu1CLZtljfAq8ejGY4cc+ DMtQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=A5fWn6NH; 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=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 w12si11748898pgs.511.2018.03.07.23.13.16; Wed, 07 Mar 2018 23:13:16 -0800 (PST) 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=@microsoft.com header.s=selector1 header.b=A5fWn6NH; 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=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933757AbeCHHNP (ORCPT + 10 others); Thu, 8 Mar 2018 02:13:15 -0500 Received: from mail-by2nam03on0095.outbound.protection.outlook.com ([104.47.42.95]:43489 "EHLO NAM03-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754741AbeCHE4E (ORCPT ); Wed, 7 Mar 2018 23:56:04 -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=QmuKJQ4uPuvB8JN6rSUc3duFC5kHyqvJSap6ury9A9Y=; b=A5fWn6NH0gA4qDLEt2fv/AnYHCKf8NOaU1H/ME8dcC3F8WKGZcxHu3M7xCpKgpRKVDD6HFE8TJgUeplENcrwP8UvEV1tY0RyzDzx3o2r7iXujbXJZa0U5pFVBmKS9/W194aTw0ADfWw65QlVd4Lbv6lYPQSePi9HqnkYYNQey4M= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0902.namprd21.prod.outlook.com (52.132.132.159) 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:56:01 +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:56:01 +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.15 03/78] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Thread-Topic: [PATCH AUTOSEL for 4.15 03/78] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Thread-Index: AQHTtpnBGy6laCELi0OvitDlReYGfQ== Date: Thu, 8 Mar 2018 04:56:01 +0000 Message-ID: <20180308045525.7662-3-alexander.levin@microsoft.com> References: <20180308045525.7662-1-alexander.levin@microsoft.com> In-Reply-To: <20180308045525.7662-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; DM5PR2101MB0902; 7:Vivf4dLbpA3v6PpB0M2KuCf6OvEWDqR61HZSf7GtWIAz1AcpyrgPE14hOaSF+GyorPn/Bzo80kLxnoc/ge8qP2VKu/cb8d5YcDCk5+9mNvsw0moiLOHe3EfSkuZ4QazNpKoMs/8t3OgiXullSROlQa5Lxz4WX78pN7A1b8rpD7040e2GVBx8/BoGKzhRJNQRM84AeXNOH1TAVei1OEPtqEsC7n50L4ypm+gJSdVjmRAQJwrF7mIn52/cJ4qQG23n; 20:/2Cw8tLikCFfvThR/K4sIi5ueKmTMgNTVf1szA7Dk8P/Xp1tjdre9xa+HTQ4m6jz7tK2F3oGw5mfaYgwbSVUwehGvZpSCU+oTl3UVQuUOlMGUSaWvmylr/kzHvIb4jW3hyDSi/Sa3BpnGw9CGYB+Bq/dUq+ulELzo1UnFeslVb8= x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 57ec2daf-e8ca-4893-d942-08d584b0e422 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020); SRVR:DM5PR2101MB0902; x-ms-traffictypediagnostic: DM5PR2101MB0902: 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)(5005006)(8121501046)(10201501046)(3002001)(3231220)(944501244)(52105095)(93006095)(93001095)(6055026)(61426038)(61427038)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123564045)(20161123558120)(6072148)(201708071742011); SRVR:DM5PR2101MB0902; BCL:0; PCL:0; RULEID:; SRVR:DM5PR2101MB0902; x-forefront-prvs: 060503E79B x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(979002)(346002)(39860400002)(39380400002)(376002)(366004)(396003)(189003)(199004)(8936002)(81156014)(81166006)(7736002)(5250100002)(8676002)(99286004)(26005)(107886003)(186003)(2950100002)(106356001)(10090500001)(305945005)(66066001)(97736004)(2501003)(86362001)(3846002)(3660700001)(72206003)(6436002)(1076002)(6486002)(5660300001)(54906003)(110136005)(68736007)(53936002)(14454004)(36756003)(25786009)(478600001)(10290500003)(6506007)(2900100001)(102836004)(76176011)(6512007)(22452003)(6116002)(316002)(4326008)(105586002)(86612001)(2906002)(3280700002)(22906009)(217873001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM5PR2101MB0902; H:DM5PR2101MB1032.namprd21.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: C+n6Ad0ikkJ/W096r46D06CoRkdDHn73EphX6L6PcM9S+9fptmjl6zB3McPdk+9W8R8gJ2i3w7S+O1QoVLoDZ7E8jPtf5ZwJ+FEHYLXjy0EKJsJ2u2Fl1+C+L1cLA6FdTysNVCbHwPoMGrEpOCt2IkS+6J/GemhdcIVGmdiZaSwgMJG9UTVjjX30r/SkgfhmAlsk1c0/4QIE1qPgYk21tWL/ZJZN+jH8T60qMGXXyH2fZy2wfWVIc0CMKLy0WpZq3S45d5NA0OdN3UJMH1Sgyu8F+RKlsjwgst8X3T3Kajttun0/yWoiVU7HueppmwG8NVKmesX5OogGC60wUkhGhg== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57ec2daf-e8ca-4893-d942-08d584b0e422 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Mar 2018 04:56:01.7961 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0902 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@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 bbd7db7384e6..05ec530b8a3a 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 */