Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp550044ybp; Fri, 11 Oct 2019 00:02:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxhv3Ok6ySd/jNElyXooeMP/hKusEgx2upIHmKSQqqoJUZQ6DNz9gwjRqrqopDbmBZ80rQV X-Received: by 2002:a17:906:f258:: with SMTP id gy24mr12480339ejb.25.1570777329499; Fri, 11 Oct 2019 00:02:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570777329; cv=none; d=google.com; s=arc-20160816; b=KrIUP05cI8prT7kW91vwht3q/m7jTsnlL/M/Efr86OmjXfzLGzEmDnK368QW/hFkek 19mrP5xha4B8V4HBZ2MgPrf9geQwZOdSysyNXS7chC4NPmnbn1P5Ttc1z+nPgDGRGJYC yk01n62w6YyCDgJCJFFEj3ZILLKFg04HMfY7ij8/Vvu1kWhYvPAkKpkQtGVsezbw0ENu M4hqsxKR84azMHdWJZzPaTvzOrtBTZNZXIAh8F4wWwY53zvSHYIxnkW5VHGM4Yix4AnT uaGPJXa+B6FmRTmAv7y/mdH4LMCa58oc1wWE9+pKbFil8Ne/j0rGgv0kEzi5YXRp9hkC V/iQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature:dkim-signature; bh=WJGXpQ9qrgZmlj3pudpxEhczjZhOrnz8VL36bS5qlB4=; b=ss0SVHTzVq+uaKC3GdtAw45/B8k+4mjtil0uQvx/1WJwIIypbmaU8WRSY6NJavHIW5 dbJUwm06bF+HyqxzwCz0Zqm6l0c5E98oLSb/y6q5psZ5buiXD37SujFayP/Htvd3rS62 OnO0pO/tSEgwPO9qIhS2zs5s0lSXwibZWh+IxnmhDu64k/Mva/NSuLWyxEz/vybMO8Aq wFo7COSS8ZH78HFfwcO7BHUnAaEXu+IsOHArUopFwEwjHF8avdeJXlLT7B/s6Y3g/ruL H1eRXlLdjyVdnCD2dlKxHzvJjNkSSUEWiaXVlQ6+AGDvvBSBnr3n1ld0g5PNZh/XhP8/ n6Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b="mCRh/W68"; dkim=pass header.i=@codeaurora.org header.s=default header.b="gja3kT9/"; 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 g29si5127601edb.13.2019.10.11.00.01.45; Fri, 11 Oct 2019 00:02:09 -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; dkim=pass header.i=@codeaurora.org header.s=default header.b="mCRh/W68"; dkim=pass header.i=@codeaurora.org header.s=default header.b="gja3kT9/"; 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 S1727247AbfJKHBf (ORCPT + 99 others); Fri, 11 Oct 2019 03:01:35 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:51956 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726679AbfJKHBf (ORCPT ); Fri, 11 Oct 2019 03:01:35 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 2003260AD9; Fri, 11 Oct 2019 07:01:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570777294; bh=FjrM0GKwhYrHg3gTdRvsxbbbNqwBJ8x0GeRehvAIeLU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=mCRh/W68yyLgJ8EBrBBRKDCTiWTVP/TJAGvOSloHLsZSOb3tNLfAIGw193LmxEY+p htjOsUYQa/ZxLa9eaohpnMJvzhklw1l7LFayW1Y7EZbPrPV2ZJ3I0DoEvKZW+FLF5v C6+GJIHA8dHSgGvGI3WDA73xAAS5r5FoQZI6Prb8= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.codeaurora.org (Postfix) with ESMTP id 54BE3602FC; Fri, 11 Oct 2019 07:01:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1570777293; bh=FjrM0GKwhYrHg3gTdRvsxbbbNqwBJ8x0GeRehvAIeLU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gja3kT9/6qboMqK72LYiJdL5NkM2AjnLG0sJFb3ZL7mJg2xyuF5MJpFonGcLwgHfI PjonPadO4cjgB6rQXyYymzIBuHcgzNEF0yE/v7/rExIi3hQCQwGnwRilN2wNoE7BQH MfvdnCAtM45S2kTXBB/FiFpHjkzxeDjmK44S3/68= MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 11 Oct 2019 12:31:33 +0530 From: Harish Bandi To: Claire Chang Cc: marcel@holtmann.org, johan.hedberg@gmail.com, linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org, rjliao@codeaurora.org, rongchi@codeaurora.org, linux-bluetooth-owner@vger.kernel.org, Balakrishna Godavarthi Subject: Re: [PATCH] Bluetooth: hci_qca: fix in-band sleep enablement In-Reply-To: <20191009085116.199922-1-tientzu@chromium.org> References: <20191009085116.199922-1-tientzu@chromium.org> Message-ID: <238f01ec4b49fee4c0d08a0b8da7e95f@codeaurora.org> X-Sender: c-hbandi@codeaurora.org User-Agent: Roundcube Webmail/1.2.5 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ++ Balakrishna On 2019-10-09 14:21, Claire Chang wrote: > Enabling in-band sleep when there is no patch/nvm-config found and > bluetooth is running with the original fw/config. > > Fixes: ba8f35979002 ("Bluetooth: hci_qca: Avoid setup failure on > missing rampatch") > Fixes: 7dc5fe0814c3 ("Bluetooth: hci_qca: Avoid missing rampatch > failure with userspace fw loader") > Signed-off-by: Claire Chang > --- > drivers/bluetooth/hci_qca.c | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > index e3164c200eac..367eef893a11 100644 > --- a/drivers/bluetooth/hci_qca.c > +++ b/drivers/bluetooth/hci_qca.c > @@ -1291,10 +1291,8 @@ static int qca_setup(struct hci_uart *hu) > /* Setup patch / NVM configurations */ > ret = qca_uart_setup(hdev, qca_baudrate, soc_type, soc_ver, > firmware_name); > - if (!ret) { > - set_bit(QCA_IBS_ENABLED, &qca->flags); > - qca_debugfs_init(hdev); > - } else if (ret == -ENOENT) { > + > + if (ret == -ENOENT) { > /* No patch/nvm-config found, run with original fw/config */ > ret = 0; > } else if (ret == -EAGAIN) { > @@ -1305,6 +1303,11 @@ static int qca_setup(struct hci_uart *hu) > ret = 0; > } > > + if (!ret) { > + set_bit(QCA_IBS_ENABLED, &qca->flags); > + qca_debugfs_init(hdev); > + } > + > /* Setup bdaddr */ > if (qca_is_wcn399x(soc_type)) > hu->hdev->set_bdaddr = qca_set_bdaddr;