lkml.org 
[lkml]   [2021]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v19 2/3] scsi: ufs: L2P map management for HPB read
Date
> > +struct utp_hpb_rsp {
> > + __be32 residual_transfer_count;
> > + __be32 reserved1[4];
> > + __be16 sense_data_len;
> > + u8 desc_type;
> > + u8 additional_len;
> > + u8 hpb_op;
> > + u8 reserved2;
While at it - can fix reserved2 -> lun

> > + u8 active_rgn_cnt;
> > + u8 inactive_rgn_cnt;
> > + struct ufshpb_active_field hpb_active_field[2];
> > + __be16 hpb_inactive_field[2];
> > +};

Thanks,
Avri

> > +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;
>
> You are assuming HPB recommandations only come in responses to LUs
> with HPB enabled, but the specs says the recommandations can come
> in any responses with GOOD status, meaning you should check the *hpb
> which belongs to the LUN in res_field, but not the one belongs to
> lrbp->cmd->device.
>
> Regards,
>
> Can Guo

\
 
 \ /
  Last update: 2021-02-06 20:19    [W:0.831 / U:0.440 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site