linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joseph Hwang <josephsih@google.com>
To: Jun Miao <jun.miao@windriver.com>
Cc: marcel@holtmann.org, johan.hedberg@gmail.com,
	luiz.dentz@gmail.com, kiran.k@intel.com,
	chethan.tumkur.narayan@intel.com, AyappadasX.Ps@intel.com,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] [v2] Bluetooth: btusb: Fix a unspported condition to set debug features
Date: Tue, 13 Jul 2021 10:40:06 +0800	[thread overview]
Message-ID: <CAHFy419+zJG0KhS7TwD_JTV2YNJum=gCoCk=Vq49pwagz4kwYw@mail.gmail.com> (raw)
In-Reply-To: <20210710030136.1567673-1-jun.miao@windriver.com>

Hi Jun Miao:

  Thanks for the patch checking out the condition of debug features.
However, the patch is actually covered by two patches that are being
reviewed.

  - [v4,1/4] Bluetooth: btusb: disable Intel link statistics telemetry
events (https://patchwork.kernel.org/project/bluetooth/patch/20210618160016.v4.1.I41aec59e65ffd3226d368dabeb084af13cc133c8@changeid/)
— this patch disables the debug features by default to avoid overhead.

  - [v4,3/4] Bluetooth: set quality report callback for Intel
(https://patchwork.kernel.org/project/bluetooth/patch/20210618160016.v4.3.I50ffa4cd0b3ab11669ff2541fc719fee00b4e244@changeid/)
— this patch checks the condition of debug features and does some
other things.

Thanks and regards,
Joseph

On Sat, Jul 10, 2021 at 11:02 AM Jun Miao <jun.miao@windriver.com> wrote:
>
> When reading the support debug features failed, there are not available
> features init. Continue to set the debug features is illogical, we should
> skip btintel_set_debug_features(), even if checked by "if (!features)".
>
> Fixes: c453b10c2b28 ("Bluetooth: btusb: Configure Intel debug feature based on available support")
> Signed-off-by: Jun Miao <jun.miao@windriver.com>
> ---
>  drivers/bluetooth/btusb.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
> index a9855a2dd561..20c804069991 100644
> --- a/drivers/bluetooth/btusb.c
> +++ b/drivers/bluetooth/btusb.c
> @@ -2907,10 +2907,11 @@ static int btusb_setup_intel_new(struct hci_dev *hdev)
>         /* Read the Intel supported features and if new exception formats
>          * supported, need to load the additional DDC config to enable.
>          */
> -       btintel_read_debug_features(hdev, &features);
> -
> -       /* Set DDC mask for available debug features */
> -       btintel_set_debug_features(hdev, &features);
> +       err = btintel_read_debug_features(hdev, &features);
> +       if (!err) {
> +               /* Set DDC mask for available debug features */
> +               btintel_set_debug_features(hdev, &features);
> +       }
>
>         /* Read the Intel version information after loading the FW  */
>         err = btintel_read_version(hdev, &ver);
> @@ -3003,10 +3004,11 @@ static int btusb_setup_intel_newgen(struct hci_dev *hdev)
>         /* Read the Intel supported features and if new exception formats
>          * supported, need to load the additional DDC config to enable.
>          */
> -       btintel_read_debug_features(hdev, &features);
> -
> -       /* Set DDC mask for available debug features */
> -       btintel_set_debug_features(hdev, &features);
> +       err = btintel_read_debug_features(hdev, &features);
> +       if (!err) {
> +               /* Set DDC mask for available debug features */
> +               btintel_set_debug_features(hdev, &features);
> +       }
>
>         /* Read the Intel version information after loading the FW  */
>         err = btintel_read_version_tlv(hdev, &version);
> --
> 2.32.0
>


-- 

Joseph Shyh-In Hwang
Email: josephsih@google.com

      parent reply	other threads:[~2021-07-13  2:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-10  3:01 [PATCH] [v2] Bluetooth: btusb: Fix a unspported condition to set debug features Jun Miao
2021-07-10  4:10 ` bluez.test.bot
2021-07-13  2:40 ` Joseph Hwang [this message]

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='CAHFy419+zJG0KhS7TwD_JTV2YNJum=gCoCk=Vq49pwagz4kwYw@mail.gmail.com' \
    --to=josephsih@google.com \
    --cc=AyappadasX.Ps@intel.com \
    --cc=chethan.tumkur.narayan@intel.com \
    --cc=johan.hedberg@gmail.com \
    --cc=jun.miao@windriver.com \
    --cc=kiran.k@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.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).