All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dishank Garg <dishank.garg@oss.qualcomm.com>
To: Bartosz Golaszewski <brgl@kernel.org>,
	Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>
Cc: linux-arm-msm@vger.kernel.org, linux-bluetooth@vger.kernel.org,
	linux-kernel@vger.kernel.org, quic_mohamull@quicinc.com,
	quic_hbandi@quicinc.com, rahul.samana@oss.qualcomm.com,
	harshitha.reddy@oss.qualcomm.com, yepuri.siddu@oss.qualcomm.com
Subject: Re: [PATCH v2] Bluetooth: qca: Allow capturing QCA debug logs in snoop logs
Date: Tue, 4 Aug 2026 15:02:49 +0530	[thread overview]
Message-ID: <59e76c3a-91ff-4fbb-936b-9a8464c60347@oss.qualcomm.com> (raw)
In-Reply-To: <20260804-qca_logs_enable-v2-1-587d584ef4c2@oss.qualcomm.com>


On 8/4/2026 10:47 AM, Dishank Garg wrote:
> Add a debugfs flag to forward QCA diagnostic ACL packets as regular
> ACL data, enabling their capture in Bluetooth snoop logs.
>
> Signed-off-by: Dishank Garg <dishank.garg@oss.qualcomm.com>
> ---
> This series adds support for capturing QCA controller debug/diagnostic
> logs in Bluetooth snoop logs. Currently, ACL packets carrying QCA
> diagnostic data are intercepted and routed to the diagnostic layer via
> hci_recv_diag(), which means they never show up in snoop captures.
> This makes it hard to correlate QCA debug logs with the surrounding
> HCI/ACL traffic when debugging issues, since the two have to be
> captured and aligned separately.
>
> The series adds a new debugfs knob, diag_as_acl, under the hci_qca
> debugfs directory. When enabled, diagnostic ACL packets are forwarded
> through the normal ACL receive path instead of being diverted to the
> diagnostic layer, so they get captured in the standard Bluetooth snoop
> log alongside all other traffic.
> ---
> Changes in v2:
> - EDITME: describe what is new in this series revision.
> - EDITME: use bulletpoints and terse descriptions.
> - Link to v1: https://patch.msgid.link/20260804-qca_logs_enable-v1-1-4e209447da0e@oss.qualcomm.com
> ---
>   drivers/bluetooth/hci_qca.c | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index 1222f97800f4..6996966319e8 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -182,6 +182,7 @@ struct qca_data {
>   	u64 rx_votes_on;
>   	u64 tx_votes_off;
>   	u64 rx_votes_off;
> +	bool diag_as_acl;
>   	u64 votes_on;
>   	u64 votes_off;
>   };
> @@ -698,6 +699,7 @@ static void qca_debugfs_init(struct hci_dev *hdev)
>   	debugfs_create_u32("wake_retrans", mode, ibs_dir, &qca->wake_retrans);
>   	debugfs_create_u32("tx_idle_delay", mode, ibs_dir,
>   			   &qca->tx_idle_delay);
> +	debugfs_create_bool("diag_as_acl", 0644, hdev->debugfs, &qca->diag_as_acl);
>   }
>   
>   /* Flush protocol data */
> @@ -998,12 +1000,14 @@ static int qca_ibs_wake_ack(struct hci_dev *hdev, struct sk_buff *skb)
>   
>   static int qca_recv_acl_data(struct hci_dev *hdev, struct sk_buff *skb)
>   {
> +	struct hci_uart *hu = hci_get_drvdata(hdev);
> +	struct qca_data *qca = hu->priv;
>   	/* We receive debug logs from chip as an ACL packets.
>   	 * Instead of sending the data to ACL to decode the
>   	 * received data, we are pushing them to the above layers
>   	 * as a diagnostic packet.
>   	 */
> -	if (get_unaligned_le16(skb->data) == QCA_DEBUG_HANDLE)
> +	if (!READ_ONCE(qca->diag_as_acl) && get_unaligned_le16(skb->data) == QCA_DEBUG_HANDLE)
>   		return hci_recv_diag(hdev, skb);
>   
>   	return hci_recv_frame(hdev, skb);
>
> ---
> base-commit: f5a7e2ae5f0a9a5caf59501457938eeb249a7dc8
> change-id: 20260803-qca_logs_enable-9b8197aaac09
>
> Best regards,
> --
> Dishank Garg <dishank.garg@oss.qualcomm.com>
Apologies for the confusion - the "v1" of this patch was sent as a test 
email to myself only, before I had added the actual To/Cc recipients. 
When I then sent it to the correct list with the full recipient list, b4 
auto-incremented it to "v2".
There were no changes to the patch content between the two - please 
disregard the v1 test mail and treat this v2 as the first real 
submission for review. I'll continue versioning normally (v2, v3, ...) 
from here if further changes are needed.

Best regards,
Dishank Garg

  parent reply	other threads:[~2026-08-04  9:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-04  5:17 [PATCH v2] Bluetooth: qca: Allow capturing QCA debug logs in snoop logs Dishank Garg
2026-08-04  7:31 ` [v2] " bluez.test.bot
2026-08-04  9:32 ` Dishank Garg [this message]
2026-08-04 17:24 ` [PATCH v2] " Luiz Augusto von Dentz

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=59e76c3a-91ff-4fbb-936b-9a8464c60347@oss.qualcomm.com \
    --to=dishank.garg@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=harshitha.reddy@oss.qualcomm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=quic_hbandi@quicinc.com \
    --cc=quic_mohamull@quicinc.com \
    --cc=rahul.samana@oss.qualcomm.com \
    --cc=yepuri.siddu@oss.qualcomm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.