public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Manish Pandey <quic_mapa@quicinc.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	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 V3 2/3] scsi: ufs-qcom: Add support for dumping MCQ registers
Date: Tue, 18 Mar 2025 12:14:21 +0530	[thread overview]
Message-ID: <20250318064421.bvlv2xz7libxikk5@thinkpad> (raw)
In-Reply-To: <20250313051635.22073-3-quic_mapa@quicinc.com>

On Thu, Mar 13, 2025 at 10:46:34AM +0530, Manish Pandey wrote:
> This patch adds functionality to dump MCQ registers.
> This will help in diagnosing issues related to MCQ
> operations by providing detailed register dumps.
> 

Same comment as previous patch. Also, make use of 75 column width.

> Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>
> ---
> 
> Changes in v3:
> - Addressed Bart's review comments by adding explanations for the
>   in_task() and usleep_range() calls.
> Changes in v2:
> - Rebased patchsets.
> - Link to v1: https://lore.kernel.org/linux-arm-msm/20241025055054.23170-1-quic_mapa@quicinc.com/
> ---
>  drivers/ufs/host/ufs-qcom.c | 60 +++++++++++++++++++++++++++++++++++++
>  drivers/ufs/host/ufs-qcom.h |  2 ++
>  2 files changed, 62 insertions(+)
> 
> diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
> index f5181773c0e5..fb9da04c0d35 100644
> --- a/drivers/ufs/host/ufs-qcom.c
> +++ b/drivers/ufs/host/ufs-qcom.c
> @@ -1566,6 +1566,54 @@ int ufs_qcom_testbus_config(struct ufs_qcom_host *host)
>  	return 0;
>  }
>  
> +static void ufs_qcom_dump_mcq_hci_regs(struct ufs_hba *hba)
> +{
> +	/* sleep intermittently to prevent CPU hog during data dumps. */
> +	/* RES_MCQ_1 */
> +	ufshcd_dump_regs(hba, 0x0, 256 * 4, "MCQ HCI 1da0000-1da03f0 ");
> +	usleep_range(1000, 1100);

If your motivation is just to not hog the CPU, use cond_resched().

- Mani

-- 
மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2025-03-18  6:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-13  5:16 [PATCH V3 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manish Pandey
2025-03-13  5:16 ` [PATCH V3 1/3] scsi: ufs-qcom: Add support for dumping HW and SW hibern8 count Manish Pandey
2025-03-18  6:35   ` Manivannan Sadhasivam
2025-03-13  5:16 ` [PATCH V3 2/3] scsi: ufs-qcom: Add support for dumping MCQ registers Manish Pandey
2025-03-18  6:44   ` Manivannan Sadhasivam [this message]
2025-03-19  6:21     ` MANISH PANDEY
2025-03-24  7:39       ` Manivannan Sadhasivam
2025-03-25  9:02         ` MANISH PANDEY
2025-03-27 16:36           ` Manivannan Sadhasivam
2025-03-13  5:16 ` [PATCH V3 3/3] scsi: ufs-qcom: Add support for testbus registers Manish Pandey
2025-03-18  7:05   ` Manivannan Sadhasivam

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=20250318064421.bvlv2xz7libxikk5@thinkpad \
    --to=manivannan.sadhasivam@linaro.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=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