mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Manish Pandey <quic_mapa@quicinc.com>,
	Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-arm-msm@vger.kernel.org, linux-scsi@vger.kernel.org,
	linux-kernel@vger.kernel.org, quic_nitirawa@quicinc.com,
	quic_cang@quicinc.com, quic_nguyenb@quicinc.com
Subject: Re: [PATCH V2 2/3] scsi: ufs-qcom: Add support for dumping MCQ registers
Date: Thu, 6 Mar 2025 09:01:11 -0800	[thread overview]
Message-ID: <7ff50e9c-8556-4b55-9457-03ee45ee07c0@acm.org> (raw)
In-Reply-To: <20250305120355.16834-3-quic_mapa@quicinc.com>

On 3/5/25 4:03 AM, Manish Pandey wrote:
> +static void ufs_qcom_dump_mcq_hci_regs(struct ufs_hba *hba)
> +{
> +	/* RES_MCQ_1 */
> +	ufshcd_dump_regs(hba, 0x0, 256 * 4, "MCQ HCI 1da0000-1da03f0 ");
> +	usleep_range(1000, 1100);

Please add a comment that explains why the usleep_range() calls are
present.

> @@ -1624,6 +1670,19 @@ static void ufs_qcom_dump_dbg_regs(struct ufs_hba *hba)
>   
>   	reg = ufs_qcom_get_debug_reg_offset(host, UFS_DBG_RD_REG_TMRLUT);
>   	ufshcd_dump_regs(hba, reg, 9 * 4, "UFS_DBG_RD_REG_TMRLUT ");
> +
> +	if (hba->mcq_enabled) {
> +		reg = ufs_qcom_get_debug_reg_offset(host, UFS_RD_REG_MCQ);
> +		ufshcd_dump_regs(hba, reg, 64 * 4, "HCI MCQ Debug Registers ");
> +	}
> +
> +	if (in_task()) {
> +		/* Dump MCQ Host Vendor Specific Registers */
> +		if (hba->mcq_enabled) {
> +			ufs_qcom_dump_mcq_hci_regs(hba);
> +			usleep_range(1000, 1100);
> +		}
> +	}
>   }

Please either combine the two "if (hba->mcq_enabled)" tests or combine
the "in_task()" and "hba->mcq_enabled" tests.

Please also add a comment that explains why the in_task() call is
present and a comment that explains why the usleep_range() call is
present.

Thanks,

Bart.

  reply	other threads:[~2025-03-06 17:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-05 12:03 [PATCH V2 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manish Pandey
2025-03-05 12:03 ` [PATCH V2 1/3] scsi: ufs-qcom: Add support for dumping HW and SW hibern8 count Manish Pandey
2025-03-05 12:03 ` [PATCH V2 2/3] scsi: ufs-qcom: Add support for dumping MCQ registers Manish Pandey
2025-03-06 17:01   ` Bart Van Assche [this message]
2025-03-05 12:03 ` [PATCH V2 3/3] scsi: ufs-qcom: Add support for testbus registers Manish Pandey
2025-03-06 17:05   ` Bart Van Assche

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=7ff50e9c-8556-4b55-9457-03ee45ee07c0@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=martin.petersen@oracle.com \
    --cc=quic_cang@quicinc.com \
    --cc=quic_mapa@quicinc.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=quic_nitirawa@quicinc.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®