Message ID | 20210523211409.210304-4-huobean@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | [v1,1/3] scsi: ufs: Let UPIU completion trace print RSP UPIU | expand |
On 5/23/21 2:14 PM, Bean Huo wrote: > + ufshcd_add_query_upiu_trace(hba, err ? UFS_QUERY_ERR : UFS_QUERY_COMP, > + (struct utp_upiu_req *)lrbp->ucd_rsp_ptr); Why is there a cast in the above code from a response pointer to a request pointer type? Thanks, Bart.
On Sun, 2021-05-23 at 18:32 -0700, Bart Van Assche wrote: > On 5/23/21 2:14 PM, Bean Huo wrote: > > > + ufshcd_add_query_upiu_trace(hba, err ? UFS_QUERY_ERR : > > UFS_QUERY_COMP, > > + (struct utp_upiu_req *)lrbp- > > >ucd_rsp_ptr); > > > Why is there a cast in the above code from a response pointer to a > > request pointer type? > > Ok, I think it is the same question as one in patch 1/3. > > Thanks, > > > > Bart.
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c index ed9059b3e63d..e8756a4fb972 100644 --- a/drivers/scsi/ufs/ufshcd.c +++ b/drivers/scsi/ufs/ufshcd.c @@ -6697,6 +6697,7 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba, 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(); spin_lock_irqsave(hba->host->host_lock, flags); @@ -6729,6 +6730,9 @@ static int ufshcd_issue_devman_upiu_cmd(struct ufs_hba *hba, } } + 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); out_unlock: