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

Daejun Park
2021-03-05T00:33:14Z

Hi, Can Guo

> > diff --git a/drivers/scsi/ufs/ufs-sysfs.c
> > b/drivers/scsi/ufs/ufs-sysfs.c
> > index 2546e7a1ac4f..00fb519406cf 100644
> > --- a/drivers/scsi/ufs/ufs-sysfs.c
> > +++ b/drivers/scsi/ufs/ufs-sysfs.c
> > @@ -841,6 +841,7 @@ out: \
> > static DEVICE_ATTR_RO(_name)
> >
> > UFS_ATTRIBUTE(boot_lun_enabled, _BOOT_LU_EN);
> > +UFS_ATTRIBUTE(max_data_size_hpb_single_cmd, _MAX_HPB_SINGLE_CMD);
> > UFS_ATTRIBUTE(current_power_mode, _POWER_MODE);
> > UFS_ATTRIBUTE(active_icc_level, _ACTIVE_ICC_LVL);
> > UFS_ATTRIBUTE(ooo_data_enabled, _OOO_DATA_EN);
> > @@ -864,6 +865,7 @@ UFS_ATTRIBUTE(wb_cur_buf, _CURR_WB_BUFF_SIZE);
> >
> > static struct attribute *ufs_sysfs_attributes[] = {
> > &dev_attr_boot_lun_enabled.attr,
> > + &dev_attr_max_data_size_hpb_single_cmd.attr,
> > &dev_attr_current_power_mode.attr,
> > &dev_attr_active_icc_level.attr,
> > &dev_attr_ooo_data_enabled.attr,
> > diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
> > index 957763db1006..e0b748777a1b 100644
> > --- a/drivers/scsi/ufs/ufs.h
> > +++ b/drivers/scsi/ufs/ufs.h
> > @@ -123,12 +123,13 @@ enum flag_idn {
> > QUERY_FLAG_IDN_WB_BUFF_FLUSH_EN = 0x0F,
> > QUERY_FLAG_IDN_WB_BUFF_FLUSH_DURING_HIBERN8 = 0x10,
> > QUERY_FLAG_IDN_HPB_RESET = 0x11,
> > + QUERY_FLAG_IDN_HPB_EN = 0x12,
>
> Also add this flag to sysfs?

Sure, I will do.

Thanks,
Daejun