Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp475454pxy; Wed, 28 Apr 2021 07:58:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7nG1YIJ2p/sGjIzLFm7xlObhh153gJVw2J4tWtTzZb3Ub+zItIlp9KLJHq8nkdEfR1w38 X-Received: by 2002:aa7:c884:: with SMTP id p4mr11917934eds.343.1619621880455; Wed, 28 Apr 2021 07:58:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1619621880; cv=none; d=google.com; s=arc-20160816; b=B8yzgkX5Z7oS49EwTlDB4tGQJYrJcnDpopbc5u03t5Ink1rMpNrq8q72VcGeF3J+Ii gIcpD2fGhlL4+XmxFjwjMvLw3u/SyLgBautUajY+p2ermwzb24BpVhIHl7U1BjXiTfw8 FjX8yv9WDP6waBd0wWlKM8X+Yk+Ag3RIJvCglaw3oqqRMgvI7S3pE2s2Fa9jk1X6t+kB S5RrW96R3LNfJdTLEE1pUKSzwycqkxefXfV6EMNQDybv1lduHf2+oJSqAZRQq4OG3srK fJPmF8rRzILAtD7Il0XjlwdD0xmAyGFOK0iyJRHfEdxndl0W4fvw61hZq2GgYn3RBH5Q QjZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=LZj2bua+UhU/q2A6M5FV49jQ1rysj+PW2kBZZtjRsGk=; b=Pm4evwcLlR1bYxpn2VFkHdwq/KvgKvKfbgg4hW2HrIuHUW2in/opurWK6kFnlZZ5oM oQuX6dXnnpjsiaDmcT06f5Q++XIfm7aXY87HAE+rs/GZy3zx6uIj8LZEq0jLgcNcnl21 RVfjL6VPpKrmIWVAXKnB6NQqBMuMnkOL8icT877gG6cNiwGK7H2KTI7A4AbtcDHeVRUO 1YLU6PryjnaBUlXx1xKcR+SaIx2J3Q3AtK3nxcoXaFEFZnpYDIdBN+WZfceAlAfW2ZUA uqGNYzxjuiiUehs6rU20+2VsZuoLXcFhwrf0XBxdUwwcMbS/Z/B4vz9jV2R5/cP39Qlf P2CQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx5si209642ejc.393.2021.04.28.07.57.36; Wed, 28 Apr 2021 07:58:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237798AbhD1OuU convert rfc822-to-8bit (ORCPT + 99 others); Wed, 28 Apr 2021 10:50:20 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:37853 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237717AbhD1OuT (ORCPT ); Wed, 28 Apr 2021 10:50:19 -0400 Received: from smtpclient.apple (p4fefc624.dip0.t-ipconnect.de [79.239.198.36]) by mail.holtmann.org (Postfix) with ESMTPSA id 57F2BCECC3; Wed, 28 Apr 2021 16:57:22 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.80.0.2.43\)) Subject: Re: [PATCH v3 3/3] Bluetooth: cache local supported codec capabilities From: Marcel Holtmann In-Reply-To: Date: Wed, 28 Apr 2021 16:49:33 +0200 Cc: "linux-bluetooth@vger.kernel.org" , "Tumkur Narayan, Chethan" , "Srivatsa, Ravishankar" Content-Transfer-Encoding: 8BIT Message-Id: <700CFB19-FE68-4B77-B8AD-97E20433E8A1@holtmann.org> References: <20210422141449.25155-1-kiran.k@intel.com> <20210422141449.25155-3-kiran.k@intel.com> <349C0A6B-5E9C-4171-BFB5-C86AF4E8D698@holtmann.org> To: "K, Kiran" X-Mailer: Apple Mail (2.3654.80.0.2.43) Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Kiran, >>> +int hci_codec_list_add(struct list_head *list, struct >> hci_rp_read_local_codec_caps *rp, >>> + __u32 len, >>> + struct hci_op_read_local_codec_caps *sent); >> >> I think you need to redo the whole patch series, since 1/3 should have >> hci_codec_list_add in that it adds the codec id from reading the codec list. >> > Ack > >> And then reading the capabilities just updates the codec. >> > With async calls converted to sync, can we add codec details to the list on reading codec caps as same codec can be supported on multiple transport types ? > >> Our problem is that the whole init phase is rather async than sync in it >> procedure. And the reason for that is purely historic from the times when >> Linus had no work queues and we had to process everything in tasklets or >> spawn kthreads. >> >> Frankly if we moved the whole init procedure to use __hci_cmd_sync we >> could fold the complete init{1-4} phases into one. And there is no reason we >> don’t do that. However one problem at a time. >> > Ack. I will define init5 for reading codecs and codec caps using __hci_cmd_sync calls. I think this is too early. I only looked at the intermingling of hci_update_background_scan. I have not gotten the whole init handling. I suspect some looking issues that would have to be cleaned up first. Regards Marcel