Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3741731ybb; Mon, 6 Apr 2020 14:56:40 -0700 (PDT) X-Google-Smtp-Source: APiQypLKao5opFWMpgW+MOb+lU6I71m3gbP/C9Ji96iiZUgmirXwwPQ3a/4TMXB3qU+5tr6A0F0U X-Received: by 2002:aca:cf87:: with SMTP id f129mr1061114oig.109.1586210200622; Mon, 06 Apr 2020 14:56:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586210200; cv=none; d=google.com; s=arc-20160816; b=mGOfDUR+AzzM1eyBStpDTU10777Gy14H8eDCaTei5O+q9DSEJAxKmwiDVyKC0Tk/BZ oiCMqnTEuDQmHkz/Tagn6cPBJ5kDiH1OWuGgFl0wpCog4wq4bEo7RjZ6t8P2cySfOQ/m JYNDY/YirKkbTcKe1pjY5wJT6vwfTI+Hzlck2enuPHFb0b7MwhfO+E5QMVkBQwdwwD5R 1mZTPGmM+/jWWXI7QK6NSrqDzS5MkB3jzDPQxNVP2bPCY4nMXDV+XhIRIozDu5d5hr9O QiHfJ+iy+O2H5HXSxXClQfLgVvWhqxyd7CFh5/9BY6JywP0zKMPNSOJ06bY+9fj58iDW mjPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=cIodbdng2iq+cjZAGnqnsCo6bh/19JD01rrelHovZW8=; b=YcPN6iAZw4wEjDt3eABxsqSWfeuoSoDTGa2vYBOlbtunsa4pW+oDYHjJmmY/UjjqFu YiH8Sz0Nc36AOQ2OzgbPKPZoTwwhGsmT+iAVn5rbtxy9kWYzDCWtDIMK8xq2eBD6/MyD RCiNMqXZ0OTw3tbMpRbbg75U4MTTRdJCct1qlCXlG6ybpIoTrAdM6eYXtxOrj7BoSR1u oIfL9BzHuTJ+w09e1l+37BitiABGNDtg4J1xYreVsyu3SOXIU6n5RdJL3L4ghbeM+jeI o8ArNChNudOG4rbTVFGaP2Lpui7mM7s2ykJr3uyZ6B/KksP3QAuCGxyGdAEpaf3rBr5M TjDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=GQTqRdC2; 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=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 j18si7614266oib.191.2020.04.06.14.56.12; Mon, 06 Apr 2020 14:56:40 -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=@chromium.org header.s=google header.b=GQTqRdC2; 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=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726130AbgDFV4M (ORCPT + 99 others); Mon, 6 Apr 2020 17:56:12 -0400 Received: from mail-lf1-f66.google.com ([209.85.167.66]:36572 "EHLO mail-lf1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725933AbgDFV4M (ORCPT ); Mon, 6 Apr 2020 17:56:12 -0400 Received: by mail-lf1-f66.google.com with SMTP id w145so745728lff.3 for ; Mon, 06 Apr 2020 14:56:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=cIodbdng2iq+cjZAGnqnsCo6bh/19JD01rrelHovZW8=; b=GQTqRdC2HOYaOWL2PWzovWG9HCNqRV2J3E4wPLl3IAkWzCJshJ174TLXtiPJ0tJ6iT ByKaFfWewXzRdLNpbRUyoHVA5KyRREIWMe+y4hcyXm0DviuUHvz8HydBUSN19CSBpuou wEjNRcdpfvZG0NSeDi3TlK2pn5LodtVN38kzQ= 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; bh=cIodbdng2iq+cjZAGnqnsCo6bh/19JD01rrelHovZW8=; b=IhVaVlM1ra6CTm03+x0ni+VjZCwuj+FkRDHk5gcNO0V26lOGdx4RrKBGSHJdIfmNfP lBri1ilGQ5PQYL7cXBQeL77THHmk3JBxmEqPO3dfmcJ1ZBD4qIDQ5XBFltKMsAIi0Ibn FHeW3hTqikbJ69i8ADjmywUh0CpROgrC+dAuj8sYrsJ3CmO5jhStx8GbOdaozWVg/4hT v/XEENXZ2LssSZWZ9UU6X5JnDOL4aNV9dzedw9DX8HpdfuE9YrwJN1G5pJJcKIQE3f0E 8VmH3UPt6ZAKrUj0K2Bp+VKQ1cw39o7H35FJu0X7gS7aYHFpYhqjFVxyQvoKFLGuYYCU e05w== X-Gm-Message-State: AGi0PuamLrX69tUfNsFcEbH/jiLVUiyGc6iXfYfSn9mAkil/Czj7DYJj GSVRyVoj81IW9ebB0fmyakDsR5XUGwOGEYJxQHXaKQ== X-Received: by 2002:a19:ef0e:: with SMTP id n14mr14264100lfh.61.1586210167662; Mon, 06 Apr 2020 14:56:07 -0700 (PDT) MIME-Version: 1.0 References: <20200404033118.22135-1-mcchou@chromium.org> <20200403203058.v5.3.I56c3ba2ec2bcfaadf57575c5c74a03dd4f8487d0@changeid> <3361CF04-0C56-4787-9A74-99664DCB4312@holtmann.org> In-Reply-To: <3361CF04-0C56-4787-9A74-99664DCB4312@holtmann.org> From: Miao-chen Chou Date: Mon, 6 Apr 2020 14:55:56 -0700 Message-ID: Subject: Re: [PATCH v5 3/3] Bluetooth: btusb: Indicate Microsoft vendor extension for Intel 9160/9260 To: Marcel Holtmann Cc: Bluetooth Kernel Mailing List , Alain Michaud , Luiz Augusto von Dentz , Johan Hedberg , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org I just realized that the patches had been applied to bluetooth-next. Thanks for the note here, and we will continue the work on top of these patches from bluetooth-next. On Sun, Apr 5, 2020 at 11:14 PM Marcel Holtmann wrote: > > Hi Miao-chen, > > > This adds a bit mask of driver_info for Microsoft vendor extension and > > indicates the support for Intel 9160/9260. This was verified with Intel > > ThunderPeak BT controller where msft_opcode is 0xFC1E. > > > > Signed-off-by: Marcel Holtmann > > Signed-off-by: Miao-chen Chou > > --- > > > > Changes in v5: > > - Extract the changes on btusb as a different commit. > > > > Changes in v4: > > - Introduce CONFIG_BT_MSFTEXT as a starting point of providing a > > framework to use Microsoft extension > > - Create include/net/bluetooth/msft.h and net/bluetooth/msft.c to > > facilitate functions of Microsoft extension. > > > > Changes in v3: > > - Create net/bluetooth/msft.c with struct msft_vnd_ext defined internally > > and change the hdev->msft_ext field to void*. > > - Define and expose msft_vnd_ext_set_opcode() for btusb use. > > - Init hdev->msft_ext in hci_alloc_dev() and deinit it in hci_free_dev(). > > > > Changes in v2: > > - Define struct msft_vnd_ext and add a field of this type to struct > > hci_dev to facilitate the support of Microsoft vendor extension. > > > > drivers/bluetooth/btusb.c | 11 ++++++++++- > > 1 file changed, 10 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > > index 3bdec42c96123..f73ad18c04559 100644 > > --- a/drivers/bluetooth/btusb.c > > +++ b/drivers/bluetooth/btusb.c > > @@ -20,6 +20,7 @@ > > > > #include > > #include > > +#include > > > > #include "btintel.h" > > #include "btbcm.h" > > @@ -58,6 +59,7 @@ static struct usb_driver btusb_driver; > > #define BTUSB_CW6622 0x100000 > > #define BTUSB_MEDIATEK 0x200000 > > #define BTUSB_WIDEBAND_SPEECH 0x400000 > > +#define BTUSB_MSFT_VND_EXT 0x800000 > > > > static const struct usb_device_id btusb_table[] = { > > /* Generic Bluetooth USB device */ > > @@ -335,7 +337,8 @@ static const struct usb_device_id blacklist_table[] = { > > > > /* Intel Bluetooth devices */ > > { USB_DEVICE(0x8087, 0x0025), .driver_info = BTUSB_INTEL_NEW | > > - BTUSB_WIDEBAND_SPEECH }, > > + BTUSB_WIDEBAND_SPEECH | > > + BTUSB_MSFT_VND_EXT }, > > { USB_DEVICE(0x8087, 0x0026), .driver_info = BTUSB_INTEL_NEW | > > BTUSB_WIDEBAND_SPEECH }, > > { USB_DEVICE(0x8087, 0x0029), .driver_info = BTUSB_INTEL_NEW | > > @@ -3800,6 +3803,12 @@ static int btusb_probe(struct usb_interface *intf, > > set_bit(HCI_QUIRK_STRICT_DUPLICATE_FILTER, &hdev->quirks); > > set_bit(HCI_QUIRK_SIMULTANEOUS_DISCOVERY, &hdev->quirks); > > set_bit(HCI_QUIRK_NON_PERSISTENT_DIAG, &hdev->quirks); > > + > > + /* All Intel controllers that support the Microsoft > > + * vendor extension are using 0xFC1E for VsMsftOpCode. > > + */ > > + if (id->driver_info & BTUSB_MSFT_VND_EXT) > > + msft_set_opcode(hdev, 0xFC1E); > > I decided to actually set the MSFT extension support in the btusb_setup_intel_new handler based on our firmware version information. I think that this will be better than USB products IDs. We can revisit this later, but for now, this should be enough. > > Johan also applied the whole series and you should base your next steps on bluetooth-next. > > Regards > > Marcel >