Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp502482ybb; Fri, 3 Apr 2020 06:55:16 -0700 (PDT) X-Google-Smtp-Source: APiQypJW7saP96svfArGQsB4SI1j5le/y85o1k+gxYAsFXAMW4HcYE/1oMLE3CCvZQ6rxIRstfSK X-Received: by 2002:a05:6830:96:: with SMTP id a22mr6341030oto.212.1585922116213; Fri, 03 Apr 2020 06:55:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585922116; cv=none; d=google.com; s=arc-20160816; b=YHO8OT3ZHqUDnwzr2mVK1WjsZFO7Suxgat3ObNCb5CqNlbAT3+ctmj00MhNYp0QN32 HGWoKoNkVt3CSeRoVYQeFiks/WU9woOHtHubte7lV2ju0N5jK+pF2mFx7L4Vl+Nw1YBE NpApB6i3KXPjhAy+bYO+Zo/ZsHL7uRO9jNZcVO4iPdBD7NNUnk27CAhBUIScMGSN4scG TtVOLiwcAfhKQmNe7vFbM/+v22g/ZOgZtGnNRvsa+5Mwon5YyeVlMhlFy2fUd1CiR46d 7hpL6jzW191jeUxFnE3QC7pwyJDpTC1TDflRDYgBn93u9dOlb8yogSLdnZz9wMfuYPh1 qTlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=2qrPWP1HMlAQ7xVCzFV4sopJDFytmcca9BIYFHQJoT4=; b=P+XJ34wzgCByc6sY+/JksA8EQdnUEPetw7Mo69wceo9bl+ZFmzYErQetOTA0LUHY4d 3a82QDFUOMkv4Wyr0NHHbwLYZ5jeELWivxnaB4ZamqkdOkyLzylAlG7Hjb8yZHW9taVC x7Fyou02bjQAxDS/0Xr1h8I3oq70wU4VjDyU3NrAs7iSci+a9xaE4/sdkVBpVXtmhSkT x8XCnjLwdxIkKOusILotdH5nGlxxPl9ANyTIdV3ScbMeVmlfyc0H2I5PDMZQ5+CxTWXf fyZXp8loIrmnLkDaymmQU30KSAG9G6uKCAGfmnLee/RP5zv4/QX1zaE/MGB6fz99Y6Yg Fv9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=vGPmz1Ev; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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.55.02; Fri, 03 Apr 2020 06:55:16 -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; dkim=pass header.i=@google.com header.s=20161025 header.b=vGPmz1Ev; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728154AbgDCNyk (ORCPT + 99 others); Fri, 3 Apr 2020 09:54:40 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:36031 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728104AbgDCNyk (ORCPT ); Fri, 3 Apr 2020 09:54:40 -0400 Received: by mail-lf1-f66.google.com with SMTP id w145so5865359lff.3 for ; Fri, 03 Apr 2020 06:54:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=2qrPWP1HMlAQ7xVCzFV4sopJDFytmcca9BIYFHQJoT4=; b=vGPmz1Eva/1WxPZgnjugPd4PTtk7Y/Dz7l6SykF4Ch05s5oqtBhQmJ4X3iAEbwZBKx ZTiEBVOjbP3JKVV5SOqmKtXXAz2BxrUQfryKHyH8XYDJ2oEwlHxAfsEbRkzi0PP4Pkng vz3zOGEC/vNU9SEpct1gjQGioIPtiOOKR/KK+c7Ygho4/85Y1/KeL5wqwpR1NcgAGBOi EzgE9EwfQKpUCj1Yu7cHCNY6+V8a6FItZx3uASXKiCbsoIyvwSVQUCMWxhty5NRsGoQ1 XFka1t8ciiRGBv2x/Ca9Ag/vXGE46nP2QyciuomcETBSMa002iN2hP01HpnD08+uANUv ANHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=2qrPWP1HMlAQ7xVCzFV4sopJDFytmcca9BIYFHQJoT4=; b=WlX7/Ac4W4DZuPz2861ljMzX/qcDE/eShOV0bbm73N+eyZ8EISlz5A2p8ijMsNbkal HVskimfjpfay5JKVwl3Wk7F0UQ5KMmxf38lV25bpjnTVewXYINwFbK+130gHD+kcfT3u xLVQNR73ygCupAlABKDJ6eFkiZyCOTXZG+k5ffZxGdyX1oj2m7NRQRWV8K/PiUWQNbBc rAUW8w9TAELM3i3F1+lfxGry85UbfuvYhyaV09wkj6jwhxqo8Vt3Nj3InAYreU1gBQTL nZuIfX+WWJUyT/oV39xd218c/zFEdfo9GsoSXjdFCWl4vcaqKP2SrB+Qlh5zN/szMlSy AKDg== X-Gm-Message-State: AGi0PuY1xysBgFXiAqZXBYVFYLjmQyMENZQWdUtBaBlX/YowIJacDv23 EqteFmiGYjQoJ0dgkHI5ogu1Oz8coR/AKaU9Y9Kavw== X-Received: by 2002:a19:c1c5:: with SMTP id r188mr5470575lff.191.1585922076042; Fri, 03 Apr 2020 06:54:36 -0700 (PDT) MIME-Version: 1.0 References: <20200403133806.246918-1-alainm@chromium.org> In-Reply-To: From: Alain Michaud Date: Fri, 3 Apr 2020 09:54:24 -0400 Message-ID: Subject: Re: [PATCH v1] bluetooth:Adding driver and quirk defs for multi-role LE To: Marcel Holtmann Cc: Alain Michaud , BlueZ Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Marcel, On Fri, Apr 3, 2020 at 9:49 AM Marcel Holtmann wrote: > > 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[] =3D { > > /* 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 necessar= y > > + * as many controllers have been seen has having trouble initiati= ng > > + * 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 bla= cklist the one or two historic controllers that don=E2=80=99t support it. > I agree it's cumbersome but given we don't have much data or existing tests around this, we don't have too many options. I strongly disagree with the approach of simply enabling it and seeing what breaks as scenarios using this functionality are expected to scale out quickly, likely before we have time to fine all controller issues. My team is building test infrastructure to help collect data with this, we already know it's already problematic on a range of controllers and we have a good idea on which controllers which will be set. We will contribute to the cumbersome part of this. > Regards > > Marcel >