Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2198142imc; Tue, 12 Mar 2019 08:53:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxAM36M0KQBlOEXNqhE8A1vVavvdfJElsg/SnQLMk61EEh+I4Cx+m/ejbetzPKEdkON6xqv X-Received: by 2002:a65:62d4:: with SMTP id m20mr36015615pgv.416.1552406009632; Tue, 12 Mar 2019 08:53:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552406009; cv=none; d=google.com; s=arc-20160816; b=fPUtv0+Ylc1QBDLCM8pT94ClQI3S9DKd8z4+81090veMHzdn11aaWwB0WbBGJEHwlV MW+yh7lrKSYHvkyJkyBNeuS1Xc6uVAt1qzytaXD9lspHqZRUY5XfPMc/yZuGSJ0tB5XO vGP+abfLw8YX7hXoAQoHjqQ/EoxZXRgB9/HThHDllVjr8hUJFJsYdgBySPcQhBgcb2zB l6RVB1B16lMMDjmO0BZqQAX1ybj4kVcHItuxCkxLm00cH/yWvrJSffEpz9ge+wERBnmu lYS74WoJTpY6it59LRt89L8m3gFpa7KfLaPlBDeCY8LX9If1UZOdHCP7KmH+ST3TZteo eyCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=kCeY8EfNcf3m/u9+AbfHhmbxZhu8wEhh5kmg/4MjREY=; b=Q2RJHVGHDURGd4P8IHa3ZzxZWMM5c4f+YdqP9GCULI0QxxGSjN2VCLKLj+P64KO9BU PLZ8iWMjbBZS7cSmaaCudozjl8KTlPpDvqIU/XLAJSsygu+Tdx0pfkVkAi6M1IWqArAF PA30+NK07jTFBLlQs3ifDPurQz6OWOO5Er1tKvUOCvy46EZGZDR3OWhFQjeYx182Zf7/ Rj2FrkukF5vNsU1qIqp325HxVBBB34VYn/m9ADbS1+RRh/K35yOimq97I/eJLe5ERoZ3 6iCKi0eWXgVtB+ivnihygC3lMCDZIPzDo6FwbbB/fTLPtZXbsnt1Z2+jlR83J+uCq4b8 d9Tg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cfYw3vGh; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f23si8773187pfa.228.2019.03.12.08.53.13; Tue, 12 Mar 2019 08:53:29 -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=@chromium.org header.s=google header.b=cfYw3vGh; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726485AbfCLPwo (ORCPT + 99 others); Tue, 12 Mar 2019 11:52:44 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:36018 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725917AbfCLPwo (ORCPT ); Tue, 12 Mar 2019 11:52:44 -0400 Received: by mail-pg1-f193.google.com with SMTP id r124so2152326pgr.3 for ; Tue, 12 Mar 2019 08:52:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=kCeY8EfNcf3m/u9+AbfHhmbxZhu8wEhh5kmg/4MjREY=; b=cfYw3vGh3/pbSvCvvdbm4moJ7S0RRKtebTwoAZfGcmlzGVZoGTMnilBFttRXFAitWP t2ohR1fVZ/4OgN15kD2EHJFmJA13DA1HZeq9sE9uxCL2Hu6p8mgcBZ3Z0WVwZAF5s1qO wFnaWThFbDnHmNNZFN1E1rvHVhzk0oXrTfC3A= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=kCeY8EfNcf3m/u9+AbfHhmbxZhu8wEhh5kmg/4MjREY=; b=G/YqZO6GGP+yENZihgrK/dmYbAhL2Gn3HPseYTQhjs08Be6C49ZdoxY7thJHGR4APR JIvy83CdZMIcYK9KaEvd862w35b2kkOMdIASR6+gy+GKCgPtQ16xXgPmDtiH5OobvEuQ cTBd/djRs3Nvh9d6K6ETJlCVXNnmVfqN39+Cg0HgfRNPQd4V364oVAKNujge8naDGvhA q8m91t2Zd0k7D4m5tHmmnBgGz7aBJ80BMxeYlTDN2e+15aM9VcjDcgkb42C+akRa1RjJ QifktndFq1RDROiOREcdBJdXyn7GcfgX2vk84J/df+lCyXzbpUrXIvinYOsiJrH5YKur iWiA== X-Gm-Message-State: APjAAAVRugU3EFURyhFk40RVyJP+Y3Tgma/7RBemRKcO17gnJFW07iuC Tgt0lfI3oY7i1MoR+3VX73MNQPoVG44= X-Received: by 2002:a17:902:a5c6:: with SMTP id t6mr11191806plq.221.1552405963491; Tue, 12 Mar 2019 08:52:43 -0700 (PDT) Received: from localhost ([2620:15c:202:1:75a:3f6e:21d:9374]) by smtp.gmail.com with ESMTPSA id f192sm24494872pfc.180.2019.03.12.08.52.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 08:52:42 -0700 (PDT) Date: Tue, 12 Mar 2019 08:52:41 -0700 From: Matthias Kaehlcke To: rjliao@codeaurora.org Cc: Balakrishna Godavarthi , marcel@holtmann.org, johan.hedberg@gmail.com, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, hemantg@codeaurora.org, linux-arm-msm@vger.kernel.org Subject: Re: [PATCH v1] Bluetooth: hci_qca: Enable the ldisc for ROME for x86 platforms. Message-ID: <20190312155241.GB200579@google.com> References: <20190307101722.25871-1-bgodavar@codeaurora.org> <20190307204224.GD138592@google.com> <6e0abe10b3ed44053e92ad6a21c75d93@codeaurora.org> <20190308185232.GB69116@google.com> <1042d21dde881e886541d32b8f0dff63@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1042d21dde881e886541d32b8f0dff63@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rocky, On Tue, Mar 12, 2019 at 05:01:59PM +0800, rjliao@codeaurora.org wrote: > 在 2019-03-09 02:52,Matthias Kaehlcke 写道: > > On Fri, Mar 08, 2019 at 10:43:14AM +0530, Balakrishna Godavarthi wrote: > > > Hi Matthias, > > > > > > On 2019-03-08 02:12, Matthias Kaehlcke wrote: > > > > Hi Balakrishna, > > > > > > > > On Thu, Mar 07, 2019 at 03:47:22PM +0530, Balakrishna Godavarthi wrote: > > > > > When using btattach to setup Rome over ldisc we observed a crash > > > > > in qca_setup as it will try to access the serdev which is not > > > > > available in the ldisc proto. This patch will fix the crash by > > > > > support both the ldisc and serdev way in the qca hci_uart driver. > > > > > > > > > > Signed-off-by: Balakrishna Godavarthi > > > > > > > > Oh, I wasn't aware of the instantiation through ldisc and was actually > > > > considering to *remove* some of the seemingly unnecessary serdev > > > > checks. > > > > > > > > > --- > > > > > drivers/bluetooth/hci_qca.c | 47 > > > > > ++++++++++++++++++++++--------------- > > > > > 1 file changed, 28 insertions(+), 19 deletions(-) > > > > > > > > > > diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c > > > > > index 237aea34b69f..0a5c98d46864 100644 > > > > > --- a/drivers/bluetooth/hci_qca.c > > > > > +++ b/drivers/bluetooth/hci_qca.c > > > > > @@ -963,7 +963,7 @@ static int qca_set_baudrate(struct hci_dev > > > > > *hdev, uint8_t baudrate) > > > > > { > > > > > struct hci_uart *hu = hci_get_drvdata(hdev); > > > > > struct qca_data *qca = hu->priv; > > > > > - struct qca_serdev *qcadev; > > > > > + struct qca_serdev *qcadev = NULL; > > > > > > > > In many cases the only field that is accessed is qcadev->btsoc_type. I > > > > think something like 'qca_get_soc_type(struct hci_dev *hdev / struct > > > > hci_uart *hu)' would make things more readable. > > > > > > > [Bala]: sure will update this in other patch once this change is > > > landed as > > > this has to > > > go in priority as we have crash coming. > > > > That's not how things should work, especially for fairly trivial > > changes. It requires reviewers to first spent time to review the patch > > that adds clutter and later spend more time to review the one that > > removes it. It's also easier to get a clean patch merged in the first > > place, rather than a noisy one. > > > > Anyway, here is my take at it: > > https://lore.kernel.org/patchwork/patch/1049014/ > > > > Please help with testing for ROME, unless you disagree with the > > approach. > > > > Thanks > > > > Matthias > > Hi Matthias, > > I will test your patch and update to you, and you are correct that AR3002 is > not part of Rome family, you should use QCA_ROME as the default return of > qca_soc_type. Thanks for the confirmation! > Could you also loop me in > https://lore.kernel.org/patchwork/patch/1049014/? This patch has been superseded by a newer version: https://lore.kernel.org/patchwork/patch/1049696/ It already landed in bluetooth-next. Testing with Rome and ldisc would still be appreciated, since I don't have such a configuration. Thanks Matthias