Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp498567ybb; Fri, 3 Apr 2020 06:50:32 -0700 (PDT) X-Google-Smtp-Source: APiQypJwdv3eRnJz6gIzRr2I0g9KVrfiuapNYeJznJd36OLnwSCzhkPMh9NNsfmaPX7CpD/QU4yj X-Received: by 2002:a05:6830:1285:: with SMTP id z5mr1274489otp.218.1585921832405; Fri, 03 Apr 2020 06:50:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585921832; cv=none; d=google.com; s=arc-20160816; b=WYu9tc96xytidAx+5OSZ2qz3mBA70y8Q1alZDFE/fSE7LXB8W7RsGVOPr/sVcVwTc5 gZU1ANv0ALfFuwfH8QbjLo/HN/cQ/sQmzBKdxygpfsiIvmYWf4Q8l9qK4qsPiRrtWU4T 2aZnOataB02U4bTsYEs/+8nteFJHTi3lDl6E9k78T1XAxW65Wi/CQqZ/sYLwWZj4EZrn Uj7wDSYkXkRMRK//l186kEAgwib5+I5lLR5cR2E7iPK8FCsHo2wPeq+7PJRtZL4vg4oU 8vHE9Mium4igpxmqQqHkQ9U9xm1HGWDhXhRQ26BVvWf1PfBCmhyD1/zNJf4b5pLfSB14 9Vew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=BcXRakBakECXRUeCxoNyqS4bmy7lDJdptkRkBRtRd+A=; b=JWkBss2wUuU79T3UL9tllp9MC12Z7tO+YEuS+ssNU01XXLOyZuWPpZx5/gj4ft6x7u FbADfbuA3RqmYWJcV6yrD6GgMY1jPibicYvsQZVb+6xO0zV1qX93ofhTlewc32HoWrol CAJ4EdrQxExcEFAaOJ3FuO8SZQV2q9+T5I+U4N/hU4KwR7RQGN8VNQOKQGyFhiJOP+BL zHg6TuKoAoSP8OgFi4m5g6yZloOYQF97WhFO0Dr/pfeirB+RXS8ReMGSMZx1FTiQgz03 e/cpbV+hv9HrfMugcmpRfEqN1yw3kPdrQ3k3+Iwm5gRnnIF6nZrONyb4XBWouhG5Ek7n 7i2g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-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 u136si3325252oif.197.2020.04.03.06.50.19; Fri, 03 Apr 2020 06:50:32 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-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-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390900AbgDCNtT convert rfc822-to-8bit (ORCPT + 99 others); Fri, 3 Apr 2020 09:49:19 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:54400 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390830AbgDCNtT (ORCPT ); Fri, 3 Apr 2020 09:49:19 -0400 Received: from marcel-macpro.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id 30CF3CECFF; Fri, 3 Apr 2020 15:58:51 +0200 (CEST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH v1] bluetooth:Adding driver and quirk defs for multi-role LE From: Marcel Holtmann In-Reply-To: <20200403133806.246918-1-alainm@chromium.org> Date: Fri, 3 Apr 2020 15:49:17 +0200 Cc: linux-bluetooth@vger.kernel.org Content-Transfer-Encoding: 8BIT Message-Id: References: <20200403133806.246918-1-alainm@chromium.org> To: Alain Michaud X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Alain, > This change adds the relevant driver and quirk to allow drivers to > report that concurrent roles are well supported by the controller. > > This has historically been disabled as controllers did not reliably > support this. In particular, this will be used to relax this condition > for controllers that have been well tested and reliable. > > /* Most controller will fail if we try to create new connections > * while we have an existing one in slave role. > */ > if (hdev->conn_hash.le_num_slave > 0) > return NULL; > > Signed-off-by: Alain Michaud > --- > > drivers/bluetooth/btusb.c | 2 ++ > include/net/bluetooth/hci.h | 8 ++++++++ > 2 files changed, 10 insertions(+) > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > index 3bdec42c9612..22e61a502d40 100644 > --- a/drivers/bluetooth/btusb.c > +++ b/drivers/bluetooth/btusb.c > @@ -58,6 +58,8 @@ static struct usb_driver btusb_driver; > #define BTUSB_CW6622 0x100000 > #define BTUSB_MEDIATEK 0x200000 > #define BTUSB_WIDEBAND_SPEECH 0x400000 > +#define BTUSB_LE_CONCURRENT_ROLES_SUPPORTED \ > + 0x800000 > > static const struct usb_device_id btusb_table[] = { > /* Generic Bluetooth USB device */ > diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h > index 5f60e135aeb6..b2c76cde7cd4 100644 > --- a/include/net/bluetooth/hci.h > +++ b/include/net/bluetooth/hci.h > @@ -214,6 +214,14 @@ enum { > * This quirk must be set before hci_register_dev is called. > */ > HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, > + > + /* When this quirk is set, the controller has validated that > + * concurrent LE roles are supported. This mechanism is necessary > + * as many controllers have been seen has having trouble initiating > + * a connectable advertisement after at least one connection in > + * central had already been established. > + */ > + HCI_QUIRK_LE_CONCURRENT_ROLES_SUPPORTED, > }; lets do this the other way around. Lets remove the limitation we have in our HCI core code. And then we see which controllers report errors. Trying to enable each controller individually is cumbersome. I rather later on blacklist the one or two historic controllers that don’t support it. Regards Marcel