Since devman_upiu_cmd() is not COMMAND UPIU, and doesn't have CDB, it is
better to use UPIU query trace, which provides more helpful information for
issue troubleshooting.
Link: https://lore.kernel.org/r/20210531104308.391842-5-huobean@gmail.com
Reviewed-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
 
        hba->dev_cmd.complete = &wait;
 
+       ufshcd_add_query_upiu_trace(hba, UFS_QUERY_SEND, lrbp->ucd_req_ptr);
        /* Make sure descriptors are ready before ringing the doorbell */
        wmb();
 
                        err = -EINVAL;
                }
        }
+       ufshcd_add_query_upiu_trace(hba, err ? UFS_QUERY_ERR : UFS_QUERY_COMP,
+                                   (struct utp_upiu_req *)lrbp->ucd_rsp_ptr);
 
 out:
        blk_put_request(req);