lkml.org 
[lkml]   [2021]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: RE: [PATCH v24 4/4] scsi: ufs: Add HPB 2.0 support
From
Date
> >         if (dev_info->wspecversion >= UFS_DEV_HPB_SUPPORT_VERSION &&
> > (b_ufs_feature_sup & UFS_DEV_HPB_SUPPORT)) {
> > - dev_info->hpb_enabled = true;
> > + bool hpb_en = false;
> > +
> > ufshpb_get_dev_info(hba, desc_buf);
> > +
> > + err = ufshcd_query_flag_retry(hba,
> > UPIU_QUERY_OPCODE_READ_FLAG,
> > + QUERY_FLAG_IDN_HPB_EN, 0, &hpb_en);
> > + if (ufshpb_is_legacy(hba) || (!err && hpb_en))
> If is_legacy you shouldn't send fHPBen in the first place, not ignoring its failure.
OK,

> Also, using a Boolean is limiting you to HPB2.0 vs. HPB1.0.
> What would you do in new flags/attributes/descriptors that HPB3.0 will introduce?
It can be managed as enum. but it is enough now, I think.

> > + dev_info->hpb_enabled = true;
> > }

Thanks,
Daejun

\
 
 \ /
  Last update: 2021-02-25 04:29    [W:0.101 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site