+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);
+Same to above comment.
+ 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.
+ 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]);
+ }
+ }
+}
+
@@ -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);
+ }
}
+
}