Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers
@ 2024-10-25  5:50 Manish Pandey
  2024-10-25  5:50 ` [PATCH 1/3] scsi: ufs-qcom: Add support for dumping HW and SW hibern8 count Manish Pandey
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Manish Pandey @ 2024-10-25  5:50 UTC (permalink / raw)
  To: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen
  Cc: linux-arm-msm, linux-scsi, linux-kernel, quic_nitirawa

Submitting a series of patches aimed at enhancing the debugging and monitoring capabilities
of the UFS-QCOM driver. These patches introduce new functionalities that will significantly
aid in diagnosing and resolving issues related to hardware and software operations.

Manish Pandey (3):
  scsi: ufs-qcom: Add support for dumping HW and SW hibern8 count
  scsi: ufs-qcom: Add support for dumping MCQ registers
  scsi: ufs-qcom: Add support for testbus registers

 drivers/ufs/host/ufs-qcom.c | 141 ++++++++++++++++++++++++++++++++++++
 drivers/ufs/host/ufs-qcom.h |  11 +++
 2 files changed, 152 insertions(+)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/3] scsi: ufs-qcom: Add support for dumping HW and SW hibern8 count
  2024-10-25  5:50 [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manish Pandey
@ 2024-10-25  5:50 ` Manish Pandey
  2024-10-25  5:50 ` [PATCH 2/3] scsi: ufs-qcom: Add support for dumping MCQ registers Manish Pandey
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: Manish Pandey @ 2024-10-25  5:50 UTC (permalink / raw)
  To: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen
  Cc: linux-arm-msm, linux-scsi, linux-kernel, quic_nitirawa

This patch adds functionality to dump both hardware and software
hibern8 enter counts. This enhancement will aid in monitoring and
debugging hibern8 state transitions by providing detailed count
information.

Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>
---
 drivers/ufs/host/ufs-qcom.c | 9 +++++++++
 drivers/ufs/host/ufs-qcom.h | 9 +++++++++
 2 files changed, 18 insertions(+)

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index a5a0646bb80a..4752311b1f76 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1487,6 +1487,15 @@ static void ufs_qcom_dump_dbg_regs(struct ufs_hba *hba)
 
 	host = ufshcd_get_variant(hba);
 
+	dev_err(hba->dev, "HW_H8_ENTER_CNT=%d\n", ufshcd_readl(hba, REG_UFS_HW_H8_ENTER_CNT));
+	dev_err(hba->dev, "HW_H8_EXIT_CNT=%d\n", ufshcd_readl(hba, REG_UFS_HW_H8_EXIT_CNT));
+
+	dev_err(hba->dev, "SW_H8_ENTER_CNT=%d\n", ufshcd_readl(hba, REG_UFS_SW_H8_ENTER_CNT));
+	dev_err(hba->dev, "SW_H8_EXIT_CNT=%d\n", ufshcd_readl(hba, REG_UFS_SW_H8_EXIT_CNT));
+
+	dev_err(hba->dev, "SW_AFTER_HW_H8_ENTER_CNT=%d\n",
+			ufshcd_readl(hba, REG_UFS_SW_AFTER_HW_H8_ENTER_CNT));
+
 	ufshcd_dump_regs(hba, REG_UFS_SYS1CLK_1US, 16 * 4,
 			 "HCI Vendor Specific Registers ");
 
diff --git a/drivers/ufs/host/ufs-qcom.h b/drivers/ufs/host/ufs-qcom.h
index b9de170983c9..84e42fa123d2 100644
--- a/drivers/ufs/host/ufs-qcom.h
+++ b/drivers/ufs/host/ufs-qcom.h
@@ -72,6 +72,15 @@ enum {
 	UFS_UFS_DBG_RD_EDTL_RAM			= 0x1900,
 };
 
+/* Vendor-specific Hibern8 count registers for the QCOM UFS host controller. */
+enum {
+	REG_UFS_HW_H8_ENTER_CNT			= 0x2700,
+	REG_UFS_SW_H8_ENTER_CNT			= 0x2704,
+	REG_UFS_SW_AFTER_HW_H8_ENTER_CNT	= 0x2708,
+	REG_UFS_HW_H8_EXIT_CNT			= 0x270C,
+	REG_UFS_SW_H8_EXIT_CNT			= 0x2710,
+};
+
 enum {
 	UFS_MEM_CQIS_VS		= 0x8,
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/3] scsi: ufs-qcom: Add support for dumping MCQ registers
  2024-10-25  5:50 [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manish Pandey
  2024-10-25  5:50 ` [PATCH 1/3] scsi: ufs-qcom: Add support for dumping HW and SW hibern8 count Manish Pandey
@ 2024-10-25  5:50 ` Manish Pandey
  2024-10-25  5:50 ` [PATCH 3/3] scsi: ufs-qcom: Add support for testbus registers Manish Pandey
  2024-11-12  7:50 ` [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manivannan Sadhasivam
  3 siblings, 0 replies; 12+ messages in thread
From: Manish Pandey @ 2024-10-25  5:50 UTC (permalink / raw)
  To: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen
  Cc: linux-arm-msm, linux-scsi, linux-kernel, quic_nitirawa

This patch adds functionality to dump Multi-Queue (MCQ) registers.
This will help in diagnosing issues related to MCQ operations by
providing detailed register dumps.

Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>
---
 drivers/ufs/host/ufs-qcom.c | 59 +++++++++++++++++++++++++++++++++++++
 drivers/ufs/host/ufs-qcom.h |  2 ++
 2 files changed, 61 insertions(+)

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 4752311b1f76..a43e818a7e14 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1480,6 +1480,52 @@ int ufs_qcom_testbus_config(struct ufs_qcom_host *host)
 	return 0;
 }
 
+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);
+
+	/* RES_MCQ_2 */
+	ufshcd_dump_regs(hba, 0x400, 256 * 4, "MCQ HCI 1da0400-1da07f0 ");
+	usleep_range(1000, 1100);
+
+	/*RES_MCQ_VS */
+	ufshcd_dump_regs(hba, 0x0, 5 * 4, "MCQ VS 1da4000-1da4010 ");
+	usleep_range(1000, 1100);
+
+	/* RES_MCQ_SQD_1 */
+	ufshcd_dump_regs(hba, 0x0, 256 * 4, "MCQ SQD 1da5000-1da53f0 ");
+	usleep_range(1000, 1100);
+
+	/* RES_MCQ_SQD_2 */
+	ufshcd_dump_regs(hba, 0x400, 256 * 4, "MCQ SQD 1da5400-1da57f0 ");
+	usleep_range(1000, 1100);
+
+	/* RES_MCQ_SQD_3 */
+	ufshcd_dump_regs(hba, 0x800, 256 * 4, "MCQ SQD 1da5800-1da5bf0 ");
+	usleep_range(1000, 1100);
+
+	/* RES_MCQ_SQD_4 */
+	ufshcd_dump_regs(hba, 0xc00, 256 * 4, "MCQ SQD 1da5c00-1da5ff0 ");
+	usleep_range(1000, 1100);
+
+	/* RES_MCQ_SQD_5 */
+	ufshcd_dump_regs(hba, 0x1000, 256 * 4, "MCQ SQD 1da6000-1da63f0 ");
+	usleep_range(1000, 1100);
+
+	/* RES_MCQ_SQD_6 */
+	ufshcd_dump_regs(hba, 0x1400, 256 * 4, "MCQ SQD 1da6400-1da67f0 ");
+	usleep_range(1000, 1100);
+
+	/* RES_MCQ_SQD_7 */
+	ufshcd_dump_regs(hba, 0x1800, 256 * 4, "MCQ SQD 1da6800-1da6bf0 ");
+	usleep_range(1000, 1100);
+
+	/* RES_MCQ_SQD_8 */
+	ufshcd_dump_regs(hba, 0x1c00, 256 * 4, "MCQ SQD 1da6c00-1da6ff0 ");
+}
+
 static void ufs_qcom_dump_dbg_regs(struct ufs_hba *hba)
 {
 	u32 reg;
@@ -1538,6 +1584,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);
+		}
+	}
 }
 
 /**
diff --git a/drivers/ufs/host/ufs-qcom.h b/drivers/ufs/host/ufs-qcom.h
index 84e42fa123d2..980af902bab5 100644
--- a/drivers/ufs/host/ufs-qcom.h
+++ b/drivers/ufs/host/ufs-qcom.h
@@ -50,6 +50,8 @@ enum {
 	 */
 	UFS_AH8_CFG				= 0xFC,
 
+	UFS_RD_REG_MCQ                          = 0xD00,
+
 	REG_UFS_CFG3				= 0x271C,
 
 	REG_UFS_DEBUG_SPARE_CFG			= 0x284C,
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/3] scsi: ufs-qcom: Add support for testbus registers
  2024-10-25  5:50 [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manish Pandey
  2024-10-25  5:50 ` [PATCH 1/3] scsi: ufs-qcom: Add support for dumping HW and SW hibern8 count Manish Pandey
  2024-10-25  5:50 ` [PATCH 2/3] scsi: ufs-qcom: Add support for dumping MCQ registers Manish Pandey
@ 2024-10-25  5:50 ` Manish Pandey
  2024-11-12  7:50 ` [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manivannan Sadhasivam
  3 siblings, 0 replies; 12+ messages in thread
From: Manish Pandey @ 2024-10-25  5:50 UTC (permalink / raw)
  To: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen
  Cc: linux-arm-msm, linux-scsi, linux-kernel, quic_nitirawa

This patch introduces support for dumping testbus registers,
enhancing the debugging capabilities for UFS-QCOM drivers.

Signed-off-by: Manish Pandey <quic_mapa@quicinc.com>
---
 drivers/ufs/host/ufs-qcom.c | 73 +++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index a43e818a7e14..7370b4a3bb83 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1480,6 +1480,75 @@ int ufs_qcom_testbus_config(struct ufs_qcom_host *host)
 	return 0;
 }
 
+static void ufs_qcom_dump_testbus(struct ufs_hba *hba)
+{
+	struct ufs_qcom_host *host = ufshcd_get_variant(hba);
+	u32 *testbus = NULL;
+	int i, j, nminor = 0, testbus_len = 0;
+	char *prefix;
+
+	testbus = kmalloc(256 * sizeof(u32), GFP_KERNEL);
+	if (!testbus)
+		return;
+
+	for (j = 0; j < TSTBUS_MAX; j++) {
+		nminor = 32;
+
+		switch (j) {
+		case TSTBUS_UAWM:
+			prefix = "TSTBUS_UAWM ";
+			break;
+		case TSTBUS_UARM:
+			prefix = "TSTBUS_UARM ";
+			break;
+		case TSTBUS_TXUC:
+			prefix = "TSTBUS_TXUC ";
+			break;
+		case TSTBUS_RXUC:
+			prefix = "TSTBUS_RXUC ";
+			break;
+		case TSTBUS_DFC:
+			prefix = "TSTBUS_DFC ";
+			break;
+		case TSTBUS_TRLUT:
+			prefix = "TSTBUS_TRLUT ";
+			break;
+		case TSTBUS_TMRLUT:
+			prefix = "TSTBUS_TMRLUT ";
+			break;
+		case TSTBUS_OCSC:
+			prefix = "TSTBUS_OCSC ";
+			break;
+		case TSTBUS_UTP_HCI:
+			prefix = "TSTBUS_UTP_HCI ";
+			break;
+		case TSTBUS_COMBINED:
+			prefix = "TSTBUS_COMBINED ";
+			break;
+		case TSTBUS_WRAPPER:
+			prefix = "TSTBUS_WRAPPER ";
+			break;
+		case TSTBUS_UNIPRO:
+			nminor = 256;
+			prefix = "TSTBUS_UNIPRO ";
+			break;
+		default:
+			break;
+		}
+
+		host->testbus.select_major = j;
+		testbus_len = nminor * sizeof(u32);
+		for (i = 0; i < nminor; i++) {
+			host->testbus.select_minor = i;
+			ufs_qcom_testbus_config(host);
+			testbus[i] = ufshcd_readl(hba, UFS_TEST_BUS);
+		}
+		print_hex_dump(KERN_ERR, prefix, DUMP_PREFIX_OFFSET,
+			       16, 4, testbus, testbus_len, false);
+	}
+	kfree(testbus);
+}
+
 static void ufs_qcom_dump_mcq_hci_regs(struct ufs_hba *hba)
 {
 	/* RES_MCQ_1 */
@@ -1596,6 +1665,10 @@ static void ufs_qcom_dump_dbg_regs(struct ufs_hba *hba)
 			ufs_qcom_dump_mcq_hci_regs(hba);
 			usleep_range(1000, 1100);
 		}
+		ufshcd_dump_regs(hba, UFS_TEST_BUS, 4, "UFS_TEST_BUS ");
+		usleep_range(1000, 1100);
+		ufs_qcom_dump_testbus(hba);
+		usleep_range(1000, 1100);
 	}
 }
 
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers
  2024-10-25  5:50 [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manish Pandey
                   ` (2 preceding siblings ...)
  2024-10-25  5:50 ` [PATCH 3/3] scsi: ufs-qcom: Add support for testbus registers Manish Pandey
@ 2024-11-12  7:50 ` Manivannan Sadhasivam
  2024-11-12 18:10   ` Bart Van Assche
  3 siblings, 1 reply; 12+ messages in thread
From: Manivannan Sadhasivam @ 2024-11-12  7:50 UTC (permalink / raw)
  To: Manish Pandey
  Cc: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen,
	linux-arm-msm, linux-scsi, linux-kernel, quic_nitirawa

On Fri, Oct 25, 2024 at 11:20:51AM +0530, Manish Pandey wrote:
> Submitting a series of patches aimed at enhancing the debugging and monitoring capabilities
> of the UFS-QCOM driver. These patches introduce new functionalities that will significantly
> aid in diagnosing and resolving issues related to hardware and software operations.
> 

TBH, the current state of dumping UFSHC registers itself is just annoying as it
pollutes the kernel ring buffer. I don't think any peripheral driver in the
kernel does this. Please dump only relevant registers, not everything that you
feel like dumping.

- Mani

> Manish Pandey (3):
>   scsi: ufs-qcom: Add support for dumping HW and SW hibern8 count
>   scsi: ufs-qcom: Add support for dumping MCQ registers
>   scsi: ufs-qcom: Add support for testbus registers
> 
>  drivers/ufs/host/ufs-qcom.c | 141 ++++++++++++++++++++++++++++++++++++
>  drivers/ufs/host/ufs-qcom.h |  11 +++
>  2 files changed, 152 insertions(+)
> 
> -- 
> 2.17.1
> 
> 

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers
  2024-11-12  7:50 ` [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manivannan Sadhasivam
@ 2024-11-12 18:10   ` Bart Van Assche
  2024-12-09  4:03     ` Manivannan Sadhasivam
  0 siblings, 1 reply; 12+ messages in thread
From: Bart Van Assche @ 2024-11-12 18:10 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Manish Pandey
  Cc: Manivannan Sadhasivam, James E.J. Bottomley, Martin K. Petersen,
	linux-arm-msm, linux-scsi, linux-kernel, quic_nitirawa

On 11/11/24 11:50 PM, Manivannan Sadhasivam wrote:
> On Fri, Oct 25, 2024 at 11:20:51AM +0530, Manish Pandey wrote:
>> Submitting a series of patches aimed at enhancing the debugging and monitoring capabilities
>> of the UFS-QCOM driver. These patches introduce new functionalities that will significantly
>> aid in diagnosing and resolving issues related to hardware and software operations.
>>
> 
> TBH, the current state of dumping UFSHC registers itself is just annoying as it
> pollutes the kernel ring buffer. I don't think any peripheral driver in the
> kernel does this. Please dump only relevant registers, not everything that you
> feel like dumping.

I wouldn't mind if the code for dumping  UFSHC registers would be removed.

Thanks,

Bart.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers
  2024-11-12 18:10   ` Bart Van Assche
@ 2024-12-09  4:03     ` Manivannan Sadhasivam
  2024-12-09 18:35       ` Bart Van Assche
  0 siblings, 1 reply; 12+ messages in thread
From: Manivannan Sadhasivam @ 2024-12-09  4:03 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Manivannan Sadhasivam, Manish Pandey, James E.J. Bottomley,
	Martin K. Petersen, linux-arm-msm, linux-scsi, linux-kernel,
	quic_nitirawa

On Tue, Nov 12, 2024 at 10:10:02AM -0800, Bart Van Assche wrote:
> On 11/11/24 11:50 PM, Manivannan Sadhasivam wrote:
> > On Fri, Oct 25, 2024 at 11:20:51AM +0530, Manish Pandey wrote:
> > > Submitting a series of patches aimed at enhancing the debugging and monitoring capabilities
> > > of the UFS-QCOM driver. These patches introduce new functionalities that will significantly
> > > aid in diagnosing and resolving issues related to hardware and software operations.
> > > 
> > 
> > TBH, the current state of dumping UFSHC registers itself is just annoying as it
> > pollutes the kernel ring buffer. I don't think any peripheral driver in the
> > kernel does this. Please dump only relevant registers, not everything that you
> > feel like dumping.
> 
> I wouldn't mind if the code for dumping  UFSHC registers would be removed.
> 

Instead of removing, I'm planning to move the dump to dev_coredump framework.
But should we move all the error prints also? Like all ufshcd_print_*()
functions?

- Mani

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers
  2024-12-09  4:03     ` Manivannan Sadhasivam
@ 2024-12-09 18:35       ` Bart Van Assche
  2024-12-10  6:14         ` Manivannan Sadhasivam
  2025-02-26  5:30         ` Manivannan Sadhasivam
  0 siblings, 2 replies; 12+ messages in thread
From: Bart Van Assche @ 2024-12-09 18:35 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Manivannan Sadhasivam, Manish Pandey, James E.J. Bottomley,
	Martin K. Petersen, linux-arm-msm, linux-scsi, linux-kernel,
	quic_nitirawa

On 12/8/24 12:03 PM, Manivannan Sadhasivam wrote:
> On Tue, Nov 12, 2024 at 10:10:02AM -0800, Bart Van Assche wrote:
>> On 11/11/24 11:50 PM, Manivannan Sadhasivam wrote:
>>> On Fri, Oct 25, 2024 at 11:20:51AM +0530, Manish Pandey wrote:
>>>> Submitting a series of patches aimed at enhancing the debugging and monitoring capabilities
>>>> of the UFS-QCOM driver. These patches introduce new functionalities that will significantly
>>>> aid in diagnosing and resolving issues related to hardware and software operations.
>>>>
>>>
>>> TBH, the current state of dumping UFSHC registers itself is just annoying as it
>>> pollutes the kernel ring buffer. I don't think any peripheral driver in the
>>> kernel does this. Please dump only relevant registers, not everything that you
>>> feel like dumping.
>>
>> I wouldn't mind if the code for dumping  UFSHC registers would be removed.
> 
> Instead of removing, I'm planning to move the dump to dev_coredump framework.
> But should we move all the error prints also? Like all ufshcd_print_*()
> functions?

Hmm ... we may be better off to check which of these functions can be 
removed rather than moving all of them to another framework.

Thanks,

Bart.


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers
  2024-12-09 18:35       ` Bart Van Assche
@ 2024-12-10  6:14         ` Manivannan Sadhasivam
  2025-02-26  5:30         ` Manivannan Sadhasivam
  1 sibling, 0 replies; 12+ messages in thread
From: Manivannan Sadhasivam @ 2024-12-10  6:14 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Manivannan Sadhasivam, Manish Pandey, James E.J. Bottomley,
	Martin K. Petersen, linux-arm-msm, linux-scsi, linux-kernel,
	quic_nitirawa

On Mon, Dec 09, 2024 at 10:35:39AM -0800, Bart Van Assche wrote:
> On 12/8/24 12:03 PM, Manivannan Sadhasivam wrote:
> > On Tue, Nov 12, 2024 at 10:10:02AM -0800, Bart Van Assche wrote:
> > > On 11/11/24 11:50 PM, Manivannan Sadhasivam wrote:
> > > > On Fri, Oct 25, 2024 at 11:20:51AM +0530, Manish Pandey wrote:
> > > > > Submitting a series of patches aimed at enhancing the debugging and monitoring capabilities
> > > > > of the UFS-QCOM driver. These patches introduce new functionalities that will significantly
> > > > > aid in diagnosing and resolving issues related to hardware and software operations.
> > > > > 
> > > > 
> > > > TBH, the current state of dumping UFSHC registers itself is just annoying as it
> > > > pollutes the kernel ring buffer. I don't think any peripheral driver in the
> > > > kernel does this. Please dump only relevant registers, not everything that you
> > > > feel like dumping.
> > > 
> > > I wouldn't mind if the code for dumping  UFSHC registers would be removed.
> > 
> > Instead of removing, I'm planning to move the dump to dev_coredump framework.
> > But should we move all the error prints also? Like all ufshcd_print_*()
> > functions?
> 
> Hmm ... we may be better off to check which of these functions can be
> removed rather than moving all of them to another framework.
> 

They are mostly for debugging the errors. I don't see why we should completely
get rid of them. Moving to devcoredump allows debugging the errors in a
standardized way and also prevents spamming the kernel ring buffer.

- Mani

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers
  2024-12-09 18:35       ` Bart Van Assche
  2024-12-10  6:14         ` Manivannan Sadhasivam
@ 2025-02-26  5:30         ` Manivannan Sadhasivam
  2025-02-26 18:40           ` Bart Van Assche
  1 sibling, 1 reply; 12+ messages in thread
From: Manivannan Sadhasivam @ 2025-02-26  5:30 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Manivannan Sadhasivam, Manish Pandey, James E.J. Bottomley,
	Martin K. Petersen, linux-arm-msm, linux-scsi, linux-kernel,
	quic_nitirawa

On Mon, Dec 09, 2024 at 10:35:39AM -0800, Bart Van Assche wrote:
> On 12/8/24 12:03 PM, Manivannan Sadhasivam wrote:
> > On Tue, Nov 12, 2024 at 10:10:02AM -0800, Bart Van Assche wrote:
> > > On 11/11/24 11:50 PM, Manivannan Sadhasivam wrote:
> > > > On Fri, Oct 25, 2024 at 11:20:51AM +0530, Manish Pandey wrote:
> > > > > Submitting a series of patches aimed at enhancing the debugging and monitoring capabilities
> > > > > of the UFS-QCOM driver. These patches introduce new functionalities that will significantly
> > > > > aid in diagnosing and resolving issues related to hardware and software operations.
> > > > > 
> > > > 
> > > > TBH, the current state of dumping UFSHC registers itself is just annoying as it
> > > > pollutes the kernel ring buffer. I don't think any peripheral driver in the
> > > > kernel does this. Please dump only relevant registers, not everything that you
> > > > feel like dumping.
> > > 
> > > I wouldn't mind if the code for dumping  UFSHC registers would be removed.
> > 
> > Instead of removing, I'm planning to move the dump to dev_coredump framework.
> > But should we move all the error prints also? Like all ufshcd_print_*()
> > functions?
> 
> Hmm ... we may be better off to check which of these functions can be
> removed rather than moving all of them to another framework.
> 

devcoredump turned out to be not a good fit for storage drivers. And I can't
figure out another way. And Qcom is telling me that these debug prints are
necessary for them to debug the issues going forward.

Your thoughts?

- Mani

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers
  2025-02-26  5:30         ` Manivannan Sadhasivam
@ 2025-02-26 18:40           ` Bart Van Assche
  2025-02-27 14:49             ` Manivannan Sadhasivam
  0 siblings, 1 reply; 12+ messages in thread
From: Bart Van Assche @ 2025-02-26 18:40 UTC (permalink / raw)
  To: Manivannan Sadhasivam
  Cc: Manivannan Sadhasivam, Manish Pandey, James E.J. Bottomley,
	Martin K. Petersen, linux-arm-msm, linux-scsi, linux-kernel,
	quic_nitirawa

On 2/25/25 9:30 PM, Manivannan Sadhasivam wrote:
> On Mon, Dec 09, 2024 at 10:35:39AM -0800, Bart Van Assche wrote:
>> On 12/8/24 12:03 PM, Manivannan Sadhasivam wrote:
>>> On Tue, Nov 12, 2024 at 10:10:02AM -0800, Bart Van Assche wrote:
>>>> On 11/11/24 11:50 PM, Manivannan Sadhasivam wrote:
>>>>> On Fri, Oct 25, 2024 at 11:20:51AM +0530, Manish Pandey wrote:
>>>>>> Submitting a series of patches aimed at enhancing the debugging and monitoring capabilities
>>>>>> of the UFS-QCOM driver. These patches introduce new functionalities that will significantly
>>>>>> aid in diagnosing and resolving issues related to hardware and software operations.
>>>>>>
>>>>>
>>>>> TBH, the current state of dumping UFSHC registers itself is just annoying as it
>>>>> pollutes the kernel ring buffer. I don't think any peripheral driver in the
>>>>> kernel does this. Please dump only relevant registers, not everything that you
>>>>> feel like dumping.
>>>>
>>>> I wouldn't mind if the code for dumping  UFSHC registers would be removed.
>>>
>>> Instead of removing, I'm planning to move the dump to dev_coredump framework.
>>> But should we move all the error prints also? Like all ufshcd_print_*()
>>> functions?
>>
>> Hmm ... we may be better off to check which of these functions can be
>> removed rather than moving all of them to another framework.
> 
> devcoredump turned out to be not a good fit for storage drivers. And I can't
> figure out another way. And Qcom is telling me that these debug prints are
> necessary for them to debug the issues going forward.
> 
> Your thoughts?

Does this mean that printk() is the best alternative we have available?

Thanks,

Bart.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers
  2025-02-26 18:40           ` Bart Van Assche
@ 2025-02-27 14:49             ` Manivannan Sadhasivam
  0 siblings, 0 replies; 12+ messages in thread
From: Manivannan Sadhasivam @ 2025-02-27 14:49 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Manivannan Sadhasivam, Manish Pandey, James E.J. Bottomley,
	Martin K. Petersen, linux-arm-msm, linux-scsi, linux-kernel,
	quic_nitirawa

On Wed, Feb 26, 2025 at 10:40:51AM -0800, Bart Van Assche wrote:
> On 2/25/25 9:30 PM, Manivannan Sadhasivam wrote:
> > On Mon, Dec 09, 2024 at 10:35:39AM -0800, Bart Van Assche wrote:
> > > On 12/8/24 12:03 PM, Manivannan Sadhasivam wrote:
> > > > On Tue, Nov 12, 2024 at 10:10:02AM -0800, Bart Van Assche wrote:
> > > > > On 11/11/24 11:50 PM, Manivannan Sadhasivam wrote:
> > > > > > On Fri, Oct 25, 2024 at 11:20:51AM +0530, Manish Pandey wrote:
> > > > > > > Submitting a series of patches aimed at enhancing the debugging and monitoring capabilities
> > > > > > > of the UFS-QCOM driver. These patches introduce new functionalities that will significantly
> > > > > > > aid in diagnosing and resolving issues related to hardware and software operations.
> > > > > > > 
> > > > > > 
> > > > > > TBH, the current state of dumping UFSHC registers itself is just annoying as it
> > > > > > pollutes the kernel ring buffer. I don't think any peripheral driver in the
> > > > > > kernel does this. Please dump only relevant registers, not everything that you
> > > > > > feel like dumping.
> > > > > 
> > > > > I wouldn't mind if the code for dumping  UFSHC registers would be removed.
> > > > 
> > > > Instead of removing, I'm planning to move the dump to dev_coredump framework.
> > > > But should we move all the error prints also? Like all ufshcd_print_*()
> > > > functions?
> > > 
> > > Hmm ... we may be better off to check which of these functions can be
> > > removed rather than moving all of them to another framework.
> > 
> > devcoredump turned out to be not a good fit for storage drivers. And I can't
> > figure out another way. And Qcom is telling me that these debug prints are
> > necessary for them to debug the issues going forward.
> > 
> > Your thoughts?
> 
> Does this mean that printk() is the best alternative we have available?
> 

For storage, yes unfortunately.

- Mani

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-02-27 14:49 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-25  5:50 [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manish Pandey
2024-10-25  5:50 ` [PATCH 1/3] scsi: ufs-qcom: Add support for dumping HW and SW hibern8 count Manish Pandey
2024-10-25  5:50 ` [PATCH 2/3] scsi: ufs-qcom: Add support for dumping MCQ registers Manish Pandey
2024-10-25  5:50 ` [PATCH 3/3] scsi: ufs-qcom: Add support for testbus registers Manish Pandey
2024-11-12  7:50 ` [PATCH 0/3] scsi: ufs-qcom: Enable Dumping of Hibern8, MCQ, and Testbus Registers Manivannan Sadhasivam
2024-11-12 18:10   ` Bart Van Assche
2024-12-09  4:03     ` Manivannan Sadhasivam
2024-12-09 18:35       ` Bart Van Assche
2024-12-10  6:14         ` Manivannan Sadhasivam
2025-02-26  5:30         ` Manivannan Sadhasivam
2025-02-26 18:40           ` Bart Van Assche
2025-02-27 14:49             ` Manivannan Sadhasivam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox