Received: by 10.213.65.68 with SMTP id h4csp239923imn; Fri, 23 Mar 2018 03:40:42 -0700 (PDT) X-Google-Smtp-Source: AG47ELvf8yx1VvUi+iiY7m/u5jbGkxc1kmwBi7xtq+twsceI79rX0Uodru1DJykHCwMMDVjJHU3I X-Received: by 10.99.152.10 with SMTP id q10mr9572475pgd.40.1521801642138; Fri, 23 Mar 2018 03:40:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521801642; cv=none; d=google.com; s=arc-20160816; b=G65yL5Yx7XBxdVB4947wvw1g6leApk+v8b2DN/cwxXMuHIkAHD49hE4rAJhXXJIMrp LOn6o9wIAWaSWQ3/ios/evSk6zluUGKCRpDVnK09kpD49dnVdwsVu8uDRrx6eS2DxTcw 1APDD+PlXGxt6HdeF6G/u+C2GRhdyJd8r3t+/Ztwj56IsQOqxryA4LQmv26k0pqvcSF/ mrk9oSaAGc0ar2OVRm6U16iKpldfU3LMC1yqWafXvHOrdy2S+qSYVDuoJ561qxFzKSXe wKAg9hXHT3a21diHZYQ6qP1mTFzOTvk6ftDAI4/ELku14liEE9rNZp2IVaxVL2Tec+hp CQfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7jPauSu3WYVxZ8KBHd+dO2tRtMeqgmTLR8hwuG1SVMY=; b=ZjrqKOPeuw8ApJD1zfx0eTDI69cfDRAGLBogK58v52DYBvsrKswKZ7fVzrnw7ejug0 GGy83EjvHR71qW/g8tw0vaI8LRNY21bWpXkHRCxZEVcA58ZwVGqO4JgyAHZM/Xf9Xgux WxWZtGVIEUaH+DPHBP3nPEOCCmgueLMOiQ6t302sZ3K6zUKvaEAHdpGTRnaeztTHKPGB p1L15feJzpJfTlfa4BTZzS8pwTdIDz8qg9pgxAWbktR6ByaDNC102tMwQSRq5UoaQffb iYB7+PmM1+Rw0KK8LHXyqhhcq2zuyLyO7oHHqcDI3zd+ZMCgc9KjASX+PXX+Ir94LHPI cdKQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k11-v6si8108064pln.257.2018.03.23.03.40.26; Fri, 23 Mar 2018 03:40:42 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756385AbeCWKj2 (ORCPT + 99 others); Fri, 23 Mar 2018 06:39:28 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:46900 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933727AbeCWKQ5 (ORCPT ); Fri, 23 Mar 2018 06:16:57 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5B65CD98; Fri, 23 Mar 2018 10:16:56 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Loic Poulain , Marcel Holtmann , Sasha Levin Subject: [PATCH 4.4 73/97] Bluetooth: hci_qca: Avoid setup failure on missing rampatch Date: Fri, 23 Mar 2018 10:55:00 +0100 Message-Id: <20180323094201.680091918@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180323094157.535925724@linuxfoundation.org> References: <20180323094157.535925724@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.4-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/bluetooth/hci_qca.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -936,6 +936,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 */