stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Aditya Garg <gargaditya08@live.com>
Cc: Thorsten Leemhuis <regressions@leemhuis.info>,
	Marcel Holtmann <marcel@holtmann.org>,
	Orlando Chamberlain <redecorating@protonmail.com>,
	Daniel Winkler <danielwinkler@google.com>,
	Johan Hedberg <johan.hedberg@intel.com>,
	"linux-bluetooth@vger.kernel.org"
	<linux-bluetooth@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	"regressions@lists.linux.dev" <regressions@lists.linux.dev>,
	"sonnysasaka@chromium.org" <sonnysasaka@chromium.org>,
	"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH 1/6] Bluetooth: add quirk disabling LE Read Transmit Power
Date: Mon, 29 Nov 2021 08:32:54 +0100	[thread overview]
Message-ID: <YaSCJg+Xkyx8w2M1@kroah.com> (raw)
In-Reply-To: <BC534C52-7FCF-4238-8933-C5706F494A11@live.com>

On Mon, Nov 29, 2021 at 07:22:27AM +0000, Aditya Garg wrote:
> From: Aditya Garg <redecorating@protonmail.com>
> 
> Some devices have a bug causing them to not work if they query LE tx power on startup. Thus we add a quirk in order to not query it and default min/max tx power values to HCI_TX_POWER_INVALID.

Please wrap your changelog text at 72 columns, like your editor asked
you to :)

> 
> Signed-off-by: Aditya Garg <gargaditya08@live.com>
> Tested-by: Aditya Garg <gargaditya08@live.com>

Tested-by: is implicit for patches you create yourself, so no need to
add it again :)


> ---
>  include/net/bluetooth/hci.h | 9 +++++++++
>  net/bluetooth/hci_core.c    | 3 ++-
>  2 files changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
> index 63065bc01b766c..383342efcdc464 100644
> --- a/include/net/bluetooth/hci.h
> +++ b/include/net/bluetooth/hci.h
> @@ -246,6 +246,15 @@ enum {
>  	 * HCI after resume.
>  	 */
>  	HCI_QUIRK_NO_SUSPEND_NOTIFIER,
> +
> +	/*
> +	 * When this quirk is set, LE tx power is not queried on startup
> +	 * and the min/max tx power values default to HCI_TX_POWER_INVALID.
> +	 *
> +	 * This quirk can be set before hci_register_dev is called or
> +	 * during the hdev->setup vendor callback.
> +	 */
> +	HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER,
>  };
>  
>  /* HCI device flags */
> diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
> index 8d33aa64846b1c..434c6878fe9640 100644
> --- a/net/bluetooth/hci_core.c
> +++ b/net/bluetooth/hci_core.c
> @@ -619,7 +619,8 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt)
>  			hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL);
>  		}
>  
> -		if (hdev->commands[38] & 0x80) {
> +		if (hdev->commands[38] & 0x80 &&
> +		!test_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks)) {

Did you run checkpatch on this patch?  Please indent properly.

thanks,

greg k-h

  parent reply	other threads:[~2021-11-29  7:35 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20211001083412.3078-1-redecorating@protonmail.com>
     [not found] ` <YYePw07y2DzEPSBR@kroah.com>
     [not found]   ` <70a875d0-7162-d149-dbc1-c2f5e1a8e701@leemhuis.info>
     [not found]     ` <20211116090128.17546-1-redecorating@protonmail.com>
     [not found]       ` <e75bf933-9b93-89d2-d73f-f85af65093c8@leemhuis.info>
     [not found]         ` <3B8E16FA-97BF-40E5-9149-BBC3E2A245FE@live.com>
     [not found]           ` <YZSuWHB6YCtGclLs@kroah.com>
     [not found]             ` <52DEDC31-EEB2-4F39-905F-D5E3F2BBD6C0@live.com>
     [not found]               ` <8919a36b-e485-500a-2722-529ffa0d2598@leemhuis.info>
     [not found]                 ` <20211117124717.12352-1-redecorating@protonmail.com>
     [not found]                   ` <F8D12EA8-4B37-4887-998E-DC0EBE60E730@holtmann.org>
     [not found]                     ` <40550C00-4EE5-480F-AFD4-A2ACA01F9DBB@live.com>
     [not found]                       ` <332a19f1-30f0-7058-ac18-c21cf78759bb@leemhuis.info>
     [not found]                         ` <D9375D91-1062-4265-9DE9-C7CF2B705F3F@live.com>
2021-11-29  7:22                           ` [PATCH 1/6] Bluetooth: add quirk disabling LE Read Transmit Power Aditya Garg
2021-11-29  7:27                             ` [PATCH 2/6] btbcm: disable read tx power for MacBook Pro 16,1 (16 inch, 2019) Aditya Garg
2021-11-29  7:28                               ` [PATCH 3/6] btbcm: disable read tx power for MacBook Pro 16,2 (13 inch - 4 Thunderbolt Ports, 2020) Aditya Garg
2021-11-29  7:30                                 ` [PATCH 4/6] btbcm: disable read tx power for MacBook Pro 16,4 (16 inch, 2019) Aditya Garg
2021-11-29  7:31                                   ` [PATCH 5/6] btbcm: disable read tx power for iMac 20,1 (Retina 5K, 27-inch, 2020) Aditya Garg
2021-11-29  7:32                                     ` [PATCH 6/6] btbcm: disable read tx power for iMac 20,2 " Aditya Garg
2021-11-29  7:46                                   ` [PATCH v2 4/6] btbcm: disable read tx power for MacBook Pro 16,4 (16 inch, 2019) Aditya Garg
2021-11-29  7:45                                 ` [PATCH v2 3/6] btbcm: disable read tx power for MacBook Pro 16,2 (13 inch - 4 Thunderbolt Ports, 2020) Aditya Garg
2021-11-29  7:44                               ` [PATCH v2 2/6] btbcm: disable read tx power for MacBook Pro 16,1 (16 inch, 2019) Aditya Garg
2021-11-29  8:08                               ` [PATCH " Marcel Holtmann
2021-11-29  8:11                                 ` Aditya Garg
2021-11-29  8:22                                   ` Marcel Holtmann
2021-11-29  8:42                                     ` Aditya Garg
2021-11-29  7:32                             ` Greg KH [this message]
2021-11-29  7:42                               ` [PATCH v2 1/6] Bluetooth: add quirk disabling LE Read Transmit Power Aditya Garg
2021-11-29  7:47                                 ` Greg KH
2021-11-29  7:49                                   ` Aditya Garg
2021-11-29  7:47                                 ` Greg KH
2021-11-29  8:05                                 ` Marcel Holtmann
2021-11-29  8:32                                   ` [PATCH v3 1/2] " Aditya Garg
2021-11-29  8:35                                     ` [PATCH v3 2/2] btbcm: disable read tx power for affected Macs with the T2 Security chip Aditya Garg
2021-11-29  8:50                                       ` [PATCH v3 resend " Aditya Garg
2021-11-29  9:05                                         ` [PATCH v4 " Aditya Garg
2021-11-29  9:25                                           ` [PATCH v5 " Aditya Garg
2021-11-29 11:03                                         ` [PATCH v3 resend " Marcel Holtmann
2021-11-29 12:01                                           ` Aditya Garg
2021-11-29  8:47                                     ` [PATCH v3 resend 1/2] Bluetooth: add quirk disabling LE Read Transmit Power Aditya Garg
2021-11-29  9:03                                       ` [PATCH v4 " Aditya Garg
2021-11-29  9:24                                         ` [PATCH v5 " Aditya Garg
2021-11-29 13:59                                           ` [PATCH v6 " Aditya Garg
2021-11-29 14:00                                             ` [PATCH v6 2/2] btbcm: disable read tx power for affected Macs with the T2 Security chip Aditya Garg
2021-11-30  8:45                                               ` Aditya Garg
2021-11-30  8:54                                                 ` Greg KH
2021-11-30 10:28                                               ` Orlando Chamberlain
2021-11-30 11:38                                             ` [PATCH v7 1/2] Bluetooth: add quirk disabling LE Read Transmit Power Aditya Garg
2021-11-30 11:40                                               ` [PATCH v7 2/2] btbcm: disable read tx power for affected Macs with the T2 Security chip Aditya Garg
2021-11-30 11:41                                               ` [PATCH v7 1/2] Bluetooth: add quirk disabling LE Read Transmit Power Greg KH
2021-11-30 11:50                                                 ` Aditya Garg
2021-11-30 11:48                                               ` [PATCH v7 resend " Aditya Garg
2021-11-30 11:49                                                 ` [PATCH v7 resend 2/2] btbcm: disable read tx power for affected Macs with the T2 Security chip Aditya Garg
2021-11-30 12:03                                                 ` [PATCH v7 resend 1/2] Bluetooth: add quirk disabling LE Read Transmit Power Greg KH
2021-11-30 12:53                                                   ` Aditya Garg
2021-11-30 12:53                                                 ` [PATCH v8 " Aditya Garg
2021-11-30 12:54                                                   ` [PATCH v8 2/2] btbcm: disable read tx power for affected Macs with the T2 Security chip Aditya Garg
2021-12-01  7:25                                                   ` [PATCH v8 1/2] Bluetooth: add quirk disabling LE Read Transmit Power Marcel Holtmann
2021-12-02 10:15                                                   ` [PATCH v9 " Aditya Garg
2021-12-02 10:16                                                     ` [PATCH v9 2/2] btbcm: disable read tx power for affected Macs with the T2 Security chip Aditya Garg
2021-12-02 12:41                                                     ` [PATCH v10 1/2] Bluetooth: add quirk disabling LE Read Transmit Power Aditya Garg
2021-12-02 12:42                                                       ` [PATCH v10 2/2] btbcm: disable read tx power for some Macs with the T2 Security chip Aditya Garg
2021-12-03 21:28                                                         ` Marcel Holtmann
2021-12-21 13:44                                                           ` Thorsten Leemhuis
2021-12-03 21:28                                                       ` [PATCH v10 1/2] Bluetooth: add quirk disabling LE Read Transmit Power Marcel Holtmann
2021-11-29  8:52                                     ` [PATCH v3 " Thorsten Leemhuis
2021-11-29 11:02                                     ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YaSCJg+Xkyx8w2M1@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=danielwinkler@google.com \
    --cc=gargaditya08@live.com \
    --cc=johan.hedberg@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=redecorating@protonmail.com \
    --cc=regressions@leemhuis.info \
    --cc=regressions@lists.linux.dev \
    --cc=sonnysasaka@chromium.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).