RE: Re: [PATCH v25 4/4] scsi: ufs: Add HPB 2.0 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > @@ -1812,8 +2307,9 @@ void ufshpb_get_geo_info(struct ufs_hba *hba, u8 
> > *geo_buf)
> >  void ufshpb_get_dev_info(struct ufs_hba *hba, u8 *desc_buf)
> >  {
> >          struct ufshpb_dev_info *hpb_dev_info = &hba->ufshpb_dev;
> > -        int version;
> > +        int version, ret;
> >          u8 hpb_mode;
> > +        u32 max_hpb_sigle_cmd = 0;
>  
> Maybe max_hpb_single_cmd?
>  
> > 
> >          hpb_mode = desc_buf[DEVICE_DESC_PARAM_HPB_CONTROL];
> >          if (hpb_mode == HPB_HOST_CONTROL) {
> > @@ -1824,13 +2320,27 @@ void ufshpb_get_dev_info(struct ufs_hba *hba,
> > u8 *desc_buf)
> >          }
> > 
> >          version = get_unaligned_be16(desc_buf + DEVICE_DESC_PARAM_HPB_VER);
> > -        if (version != HPB_SUPPORT_VERSION) {
> > +        if ((version != HPB_SUPPORT_VERSION) &&
> > +            (version != HPB_SUPPORT_LEGACY_VERSION)) {
> >                  dev_err(hba->dev, "%s: HPB %x version is not supported.\n",
> >                          __func__, version);
> >                  hpb_dev_info->hpb_disabled = true;
> >                  return;
> >          }
> > 
> > +        if (version == HPB_SUPPORT_LEGACY_VERSION)
> > +                hpb_dev_info->is_legacy = true;
> > +
> > +        pm_runtime_get_sync(hba->dev);
> > +        ret = ufshcd_query_attr_retry(hba, UPIU_QUERY_OPCODE_READ_ATTR,
> > +                QUERY_ATTR_IDN_MAX_HPB_SINGLE_CMD, 0, 0, &max_hpb_sigle_cmd);
>  
> Same here
>  
> > +        pm_runtime_put_sync(hba->dev);
> > +
> > +        if (ret)
> > +                dev_err(hba->dev, "%s: idn: read max size of single hpb cmd query
> > request failed",
> > +                        __func__);
> > +        hpb_dev_info->max_hpb_single_cmd = max_hpb_sigle_cmd;
>  
> Same here
>  

Done.

Thanks,
Daejun



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux