Hi Can Guo,
> +static voidYou're comment is good point for improving this patch. But there is no
> +ufshpb_set_hpb_read_to_upiu(struct ufshpb_lu *hpb, struct ufshcd_lrb
> *lrbp,
> + u32 lpn, u64 ppn, unsigned int transfer_len)
> +{
> + unsigned char *cdb = lrbp->ucd_req_ptr->sc.cdb;
> +
> + cdb[0] = UFSHPB_READ;
You are only replacing opcode in cdb[0], but ufshcd_add_command_trace()
is
counting on lrbp->cmd->cmnd. This will lead to wrong opcode recorded by
UFS ftrace.
"case" for HPB read (0xF8) in ufshcd_add_command_trace().
So I will add codes to support tracing HPB read command in
ufshcd_add_command_trace() on next patch.
Thanks,
Daejun