lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1e9dca38dba71b0a8437f752db5f97cab789af60.camel@gmail.com>
Date:   Fri, 08 May 2020 11:09:10 +0200
From:   Bean Huo <huobean@...il.com>
To:     Bart Van Assche <bvanassche@....org>, alim.akhtar@...sung.com,
        avri.altman@....com, asutoshd@...eaurora.org, jejb@...ux.ibm.com,
        martin.petersen@...cle.com, stanley.chu@...iatek.com,
        beanhuo@...ron.com, tomas.winkler@...el.com, rdunlap@...radead.org
Cc:     linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
        hch@...radead.org, cang@...eaurora.org
Subject: Re: [RESENT PATCH RFC v3 1/5] scsi; ufs: add device descriptor for
 Host Performance Booster

On Thu, 2020-05-07 at 17:59 -0700, Bart Van Assche wrote:
> On 2020-05-04 07:20, huobean@...il.com wrote:
> > diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> > index 698e8d20b4ba..de13d2333f1f 100644
> > --- a/drivers/scsi/ufs/ufshcd.c
> > +++ b/drivers/scsi/ufs/ufshcd.c
> > @@ -6627,6 +6627,17 @@ static int ufs_get_device_desc(struct
> > ufs_hba *hba)
> >  		goto out;
> >  	}
> >  
> > +	if (desc_buf[DEVICE_DESC_PARAM_UFS_FEAT] & 0x80) {
> > +		hba->dev_info.hpb_control_mode =
> > +			desc_buf[DEVICE_DESC_PARAM_HPB_CTRL_MODE];
> > +		hba->dev_info.hpb_ver =
> > +			(u16) (desc_buf[DEVICE_DESC_PARAM_HPB_VER] <<
> > 8) |
> > +			desc_buf[DEVICE_DESC_PARAM_HPB_VER + 1];
> > +		dev_info(hba->dev, "HPB Version: 0x%2x\n",
> > +			 hba->dev_info.hpb_ver);
> > +		dev_info(hba->dev, "HPB control mode: %d\n",
> > +			 hba->dev_info.hpb_control_mode);
> > +	}
> >  	/*
> >  	 * getting vendor (manufacturerID) and Bank Index in big endian
> >  	 * format
> 
> Please introduce a symbolic name for the constant 0x80, e.g.
> UFS_FEATURE_HPB.
> 
> Please use get_unaligned_be16() instead of open-coding it.
> 
> Thanks,
> 
> Bart.
> 
> 
Bart
thanks, I will change them in the next version.

thanks.

Bean

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ