[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR04MB6575CEC34FE02E79873E3196FC3F9@DM6PR04MB6575.namprd04.prod.outlook.com>
Date: Tue, 8 Nov 2022 21:41:27 +0000
From: Avri Altman <Avri.Altman@....com>
To: Bean Huo <beanhuo@...pp.de>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"bvanassche@....org" <bvanassche@....org>,
"tomas.winkler@...el.com" <tomas.winkler@...el.com>,
"daejun7.park@...sung.com" <daejun7.park@...sung.com>,
"quic_cang@...cinc.com" <quic_cang@...cinc.com>,
"quic_nguyenb@...cinc.com" <quic_nguyenb@...cinc.com>,
"quic_xiaosenh@...cinc.com" <quic_xiaosenh@...cinc.com>,
"quic_richardp@...cinc.com" <quic_richardp@...cinc.com>,
"quic_asutoshd@...cinc.com" <quic_asutoshd@...cinc.com>,
"hare@...e.de" <hare@...e.de>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [RFC PATCH v1 1/2] ufs: core: Advanced RPMB detection
> Avri,
>
> thanks for your review.
>
> On Tue, 2022-11-08 at 13:40 +0000, Avri Altman wrote:
> > > From: Bean Huo <beanhuo@...ron.com>
> > >
> > > Check UFS Advanced RPMB LU enablement during ufshcd_lu_init().
> > >
> > > Signed-off-by: Bean Huo <beanhuo@...ron.com>
> > > ---
> > > drivers/ufs/core/ufshcd.c | 4 ++++
> > > include/ufs/ufs.h | 3 +++
> > > 2 files changed, 7 insertions(+)
> > >
> > > diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> > > index ee73d7036133..d49e7a0b82ca 100644
> > > --- a/drivers/ufs/core/ufshcd.c
> > > +++ b/drivers/ufs/core/ufshcd.c
> > > @@ -4940,6 +4940,10 @@ static void ufshcd_lu_init(struct ufs_hba
> > > *hba, struct scsi_device *sdev)
> > > desc_buf[UNIT_DESC_PARAM_LU_WR_PROTECT] ==
> > > UFS_LU_POWER_ON_WP)
> > > hba->dev_info.is_lu_power_on_wp = true;
> > >
> > > + if (desc_buf[UNIT_DESC_PARAM_UNIT_INDEX] == UFS_RPMB_UNIT
> > > &&
> > Please remind me why do we need both UFS_RPMB_UNIT and
> > UFS_UPIU_RPMB_WLUN ?
>
> I see. they are the same value, we should remove one, will change it in next
> version.
> >
> > > + desc_buf[UNIT_DESC_PARAM_RPMB_REGION_EN] & 1 << 4)
> > (1 << 4) or BIT(4) ?
Not saying that testing bit 4 of bRPMBRegionEnable is wrong,
Have you considered using bit 10 of dExtendedUFSFeaturesSupport and decided otherwise?
Thanks,
Avri
Powered by blists - more mailing lists