From: Ziqi Chen <quic_ziqichen@quicinc.com> To: Po-Wen Kao <powen.kao@mediatek.com>, <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, Alim Akhtar <alim.akhtar@samsung.com>, Avri Altman <avri.altman@wdc.com>, Bart Van Assche <bvanassche@acm.org>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, Matthias Brugger <matthias.bgg@gmail.com>, <quic_ziqichen@quicinc.com> Cc: <wsd_upstream@mediatek.com>, <peter.wang@mediatek.com>, <stanley.chu@mediatek.com>, <alice.chao@mediatek.com>, <naomi.chu@mediatek.com>, <chun-hung.wu@mediatek.com>, <cc.chou@mediatek.com>, <eddie.huang@mediatek.com>, <mason.zhang@mediatek.com>, <chaotian.jing@mediatek.com>, <jiajie.hao@mediatek.com>, <quic_cang@quicinc.com>, <quic_asutoshd@quicinc.com> Subject: Re: [PATCH v2 4/7] scsi: ufs: core: Add hwq print for debug Date: Thu, 23 Feb 2023 18:49:59 +0800 [thread overview] Message-ID: <3b26b123-0bd1-24ed-f6d7-36e08296a5a5@quicinc.com> (raw) In-Reply-To: <1b9c2bc9-a349-062a-597c-336804c05394@quicinc.com> On 2/23/2023 6:14 PM, Ziqi Chen wrote: > Hi Po-Wen, > > On 2/22/2023 11:04 AM, Po-Wen Kao wrote: >> +void ufshcd_mcq_print_hwqs(struct ufs_hba *hba, unsigned long bitmap) >> +{ >> + int id, i; >> + char prefix[15]; >> + >> + if (!is_mcq_enabled(hba)) >> + return; >> + >> + for_each_set_bit(id, &bitmap, hba->nr_hw_queues) { >> + snprintf(prefix, sizeof(prefix), "q%d SQCFG: ", id); >> + ufshcd_hex_dump(prefix, >> + hba->mcq_base + MCQ_QCFG_SIZE * id, MCQ_QCFG_SQ_SIZE); > > Is your purpose dump per hardware queue registers here? If yes, why > don't use ufsmcq_readl() to save to a buffer and then use > ufshcd_hex_dump() > > to dump ? Are you sure ufshcd_hex_dump() can dump register directly? > >> + >> + snprintf(prefix, sizeof(prefix), "q%d CQCFG: ", id); >> + ufshcd_hex_dump(prefix, >> + hba->mcq_base + MCQ_QCFG_SIZE * id + MCQ_QCFG_SQ_SIZE, >> MCQ_QCFG_CQ_SIZE); > Same to above comment. >> + >> + for (i = 0; i < OPR_MAX ; i++) { >> + snprintf(prefix, sizeof(prefix), "q%d OPR%d: ", id, i); >> + ufshcd_hex_dump(prefix, mcq_opr_base(hba, i, id), >> mcq_opr_size[i]); > Same. >> + } >> + } >> +} >> + >> >> @@ -574,7 +569,16 @@ void ufshcd_print_trs(struct ufs_hba *hba, >> unsigned long bitmap, bool pr_prdt) >> if (pr_prdt) >> ufshcd_hex_dump("UPIU PRDT: ", lrbp->ucd_prdt_ptr, >> ufshcd_sg_entry_size(hba) * prdt_length); >> + >> + if (is_mcq_enabled(hba)) { >> + cmd = lrbp->cmd; >> + if (!cmd) >> + return; >> + hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd)); >> + ufshcd_mcq_print_hwqs(hba, 1 << hwq->id); > > Calling registers dump function in ufshcd_print_trs() is not > reasonable, eg.. for each aborted request, it would print out all hwq > registers, it's not make sense. > > I think we should move it out of ufshcd_print_trs(). One more thing, ufshcd_err_handler() pass hba-> outstanding_reqs to ufshcd_print_trs() as the 2nd parameter, but the hba-> outstanding_reqs is not used in MCQ mode. I am making a change to print trs for MCQ mode by trying to get bitmap of started Reqs from block layer . My opinion is keeping ufshcd_print_trs just print UPIU details , don't invoke register dump. > >> + } >> } >> + >> } > > > Best Regards, > > Ziqi >
WARNING: multiple messages have this Message-ID (diff)
From: Ziqi Chen <quic_ziqichen@quicinc.com> To: Po-Wen Kao <powen.kao@mediatek.com>, <linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, Alim Akhtar <alim.akhtar@samsung.com>, Avri Altman <avri.altman@wdc.com>, Bart Van Assche <bvanassche@acm.org>, "James E.J. Bottomley" <jejb@linux.ibm.com>, "Martin K. Petersen" <martin.petersen@oracle.com>, Matthias Brugger <matthias.bgg@gmail.com>, <quic_ziqichen@quicinc.com> Cc: <wsd_upstream@mediatek.com>, <peter.wang@mediatek.com>, <stanley.chu@mediatek.com>, <alice.chao@mediatek.com>, <naomi.chu@mediatek.com>, <chun-hung.wu@mediatek.com>, <cc.chou@mediatek.com>, <eddie.huang@mediatek.com>, <mason.zhang@mediatek.com>, <chaotian.jing@mediatek.com>, <jiajie.hao@mediatek.com>, <quic_cang@quicinc.com>, <quic_asutoshd@quicinc.com> Subject: Re: [PATCH v2 4/7] scsi: ufs: core: Add hwq print for debug Date: Thu, 23 Feb 2023 18:49:59 +0800 [thread overview] Message-ID: <3b26b123-0bd1-24ed-f6d7-36e08296a5a5@quicinc.com> (raw) In-Reply-To: <1b9c2bc9-a349-062a-597c-336804c05394@quicinc.com> On 2/23/2023 6:14 PM, Ziqi Chen wrote: > Hi Po-Wen, > > On 2/22/2023 11:04 AM, Po-Wen Kao wrote: >> +void ufshcd_mcq_print_hwqs(struct ufs_hba *hba, unsigned long bitmap) >> +{ >> + int id, i; >> + char prefix[15]; >> + >> + if (!is_mcq_enabled(hba)) >> + return; >> + >> + for_each_set_bit(id, &bitmap, hba->nr_hw_queues) { >> + snprintf(prefix, sizeof(prefix), "q%d SQCFG: ", id); >> + ufshcd_hex_dump(prefix, >> + hba->mcq_base + MCQ_QCFG_SIZE * id, MCQ_QCFG_SQ_SIZE); > > Is your purpose dump per hardware queue registers here? If yes, why > don't use ufsmcq_readl() to save to a buffer and then use > ufshcd_hex_dump() > > to dump ? Are you sure ufshcd_hex_dump() can dump register directly? > >> + >> + snprintf(prefix, sizeof(prefix), "q%d CQCFG: ", id); >> + ufshcd_hex_dump(prefix, >> + hba->mcq_base + MCQ_QCFG_SIZE * id + MCQ_QCFG_SQ_SIZE, >> MCQ_QCFG_CQ_SIZE); > Same to above comment. >> + >> + for (i = 0; i < OPR_MAX ; i++) { >> + snprintf(prefix, sizeof(prefix), "q%d OPR%d: ", id, i); >> + ufshcd_hex_dump(prefix, mcq_opr_base(hba, i, id), >> mcq_opr_size[i]); > Same. >> + } >> + } >> +} >> + >> >> @@ -574,7 +569,16 @@ void ufshcd_print_trs(struct ufs_hba *hba, >> unsigned long bitmap, bool pr_prdt) >> if (pr_prdt) >> ufshcd_hex_dump("UPIU PRDT: ", lrbp->ucd_prdt_ptr, >> ufshcd_sg_entry_size(hba) * prdt_length); >> + >> + if (is_mcq_enabled(hba)) { >> + cmd = lrbp->cmd; >> + if (!cmd) >> + return; >> + hwq = ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(cmd)); >> + ufshcd_mcq_print_hwqs(hba, 1 << hwq->id); > > Calling registers dump function in ufshcd_print_trs() is not > reasonable, eg.. for each aborted request, it would print out all hwq > registers, it's not make sense. > > I think we should move it out of ufshcd_print_trs(). One more thing, ufshcd_err_handler() pass hba-> outstanding_reqs to ufshcd_print_trs() as the 2nd parameter, but the hba-> outstanding_reqs is not used in MCQ mode. I am making a change to print trs for MCQ mode by trying to get bitmap of started Reqs from block layer . My opinion is keeping ufshcd_print_trs just print UPIU details , don't invoke register dump. > >> + } >> } >> + >> } > > > Best Regards, > > Ziqi > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-02-23 10:50 UTC|newest] Thread overview: 56+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-02-22 3:04 [PATCH v2 0/7] Several UFS MCQ Code Changes Po-Wen Kao 2023-02-22 3:04 ` Po-Wen Kao 2023-02-22 3:04 ` [PATCH v2 1/7] scsi: ufs: core: Fix mcq tag calcualtion Po-Wen Kao 2023-02-22 3:04 ` Po-Wen Kao 2023-02-23 10:22 ` Ziqi Chen 2023-02-23 10:22 ` Ziqi Chen 2023-02-22 3:04 ` [PATCH v2 2/7] scsi: ufs: core: Rename symbols Po-Wen Kao 2023-02-22 3:04 ` Po-Wen Kao 2023-02-22 3:11 ` Stanley Chu 2023-02-22 3:11 ` Stanley Chu 2023-02-23 10:27 ` Ziqi Chen 2023-02-23 10:27 ` Ziqi Chen 2023-02-27 22:41 ` Bart Van Assche 2023-02-27 22:41 ` Bart Van Assche 2023-02-22 3:04 ` [PATCH v2 3/7] scsi: ufs: core: Fix mcq nr_hw_queues Po-Wen Kao 2023-02-22 3:04 ` Po-Wen Kao 2023-02-22 3:16 ` Stanley Chu 2023-02-22 3:16 ` Stanley Chu 2023-02-23 10:32 ` Ziqi Chen 2023-02-23 10:32 ` Ziqi Chen 2023-02-23 14:43 ` Powen Kao (高伯文) 2023-02-23 14:43 ` Powen Kao (高伯文) 2023-02-27 22:41 ` Bart Van Assche 2023-02-27 22:41 ` Bart Van Assche 2023-02-22 3:04 ` [PATCH v2 4/7] scsi: ufs: core: Add hwq print for debug Po-Wen Kao 2023-02-22 3:04 ` Po-Wen Kao 2023-02-23 10:14 ` Ziqi Chen 2023-02-23 10:14 ` Ziqi Chen 2023-02-23 10:49 ` Ziqi Chen [this message] 2023-02-23 10:49 ` Ziqi Chen 2023-02-23 14:13 ` Powen Kao (高伯文) 2023-02-23 14:13 ` Powen Kao (高伯文) 2023-02-27 3:14 ` Ziqi Chen 2023-02-27 3:14 ` Ziqi Chen 2023-02-28 2:57 ` Bao D. Nguyen 2023-02-28 2:57 ` Bao D. Nguyen 2023-03-01 2:17 ` Powen Kao (高伯文) 2023-03-01 2:17 ` Powen Kao (高伯文) 2023-03-01 18:50 ` Bart Van Assche 2023-03-01 18:50 ` Bart Van Assche 2023-03-01 18:55 ` Slade's Kernel Patch Bot 2023-03-01 18:55 ` Slade's Kernel Patch Bot 2023-02-27 22:47 ` Bart Van Assche 2023-02-27 22:47 ` Bart Van Assche 2023-02-22 3:04 ` [PATCH v2 5/7] scsi: ufs: core: Remove redundant check Po-Wen Kao 2023-02-22 3:04 ` Po-Wen Kao 2023-02-22 3:33 ` Stanley Chu 2023-02-22 3:33 ` Stanley Chu 2023-02-23 10:52 ` Ziqi Chen 2023-02-23 10:52 ` Ziqi Chen 2023-02-22 3:04 ` [PATCH v2 6/7] scsi: ufs: core: Export symbols for MTK driver module Po-Wen Kao 2023-02-22 3:04 ` Po-Wen Kao 2023-02-22 5:19 ` Stanley Chu 2023-02-22 5:19 ` Stanley Chu 2023-02-22 3:04 ` [PATCH v2 7/7] scsi: ufs: mtk-host: Add MCQ support for MTK platform Po-Wen Kao 2023-02-22 3:04 ` Po-Wen Kao
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=3b26b123-0bd1-24ed-f6d7-36e08296a5a5@quicinc.com \ --to=quic_ziqichen@quicinc.com \ --cc=alice.chao@mediatek.com \ --cc=alim.akhtar@samsung.com \ --cc=avri.altman@wdc.com \ --cc=bvanassche@acm.org \ --cc=cc.chou@mediatek.com \ --cc=chaotian.jing@mediatek.com \ --cc=chun-hung.wu@mediatek.com \ --cc=eddie.huang@mediatek.com \ --cc=jejb@linux.ibm.com \ --cc=jiajie.hao@mediatek.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=linux-scsi@vger.kernel.org \ --cc=martin.petersen@oracle.com \ --cc=mason.zhang@mediatek.com \ --cc=matthias.bgg@gmail.com \ --cc=naomi.chu@mediatek.com \ --cc=peter.wang@mediatek.com \ --cc=powen.kao@mediatek.com \ --cc=quic_asutoshd@quicinc.com \ --cc=quic_cang@quicinc.com \ --cc=stanley.chu@mediatek.com \ --cc=wsd_upstream@mediatek.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: linkBe 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.