lkml.org 
[lkml]   [2021]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v21 2/4] scsi: ufs: L2P map management for HPB read
Date

> +static bool ufshpb_is_hpb_rsp_valid(struct ufs_hba *hba,
> + struct ufshcd_lrb *lrbp,
> + struct utp_hpb_rsp *rsp_field)
> +{
> + if (be16_to_cpu(rsp_field->sense_data_len) != DEV_SENSE_SEG_LEN ||
> + rsp_field->desc_type != DEV_DES_TYPE ||
> + rsp_field->additional_len != DEV_ADDITIONAL_LEN ||
> + rsp_field->active_rgn_cnt > MAX_ACTIVE_NUM ||
> + rsp_field->inactive_rgn_cnt > MAX_INACTIVE_NUM ||
> + (rsp_field->hpb_op == HPB_RSP_REQ_REGION_UPDATE &&
> + !rsp_field->active_rgn_cnt && !rsp_field->inactive_rgn_cnt))
> + return false;
> +
> + /* we cannot access HPB from other LU */
> + if (lrbp->lun != rsp_field->lun)
> + return false;
Why not?
Clearly this against the spec which allows to attach hpb sense crossed luns

> +
> + if (!ufshpb_is_general_lun(lrbp->lun)) {
> + dev_warn(hba->dev, "ufshpb: lun(%d) not supported\n",
> + lrbp->lun);
> + return false;
> + }
> +
> + return true;
> +}




> +void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> +{
> + struct ufshpb_lu *hpb = ufshpb_get_hpb_data(lrbp->cmd->device);
> + struct utp_hpb_rsp *rsp_field;
> + int data_seg_len;
> +
> + if (!hpb)
> + return;
Ditto
\
 
 \ /
  Last update: 2021-02-21 12:57    [W:0.247 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site