On 4/12/24 02:34, Peter Wang (王信友) wrote:
+if (is_mcq_enabled(hba)) {
+struct ufs_hw_queue *hwq =
+ufshcd_mcq_req_to_hwq(hba, scsi_cmd_to_rq(scmd));
+
+ufshcd_mcq_poll_cqe_lock(hba, hwq, &cmd2);
+} else {
+__ufshcd_poll(hba->host, UFSHCD_POLL_FROM_INTERRUPT_CONTEXT,
+ &cmd2);
may need check __ufshcd_poll return value?
I don't think we should do that. __ufshcd_poll() returns a value > 0 if
it has completed any SCSI command and may complete commands other than
@scmd. In this function we need to know whether or not @scmd has been
completed.
Thanks,
Bart.