[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1087081975.11593562201594.JavaMail.epsvc@epcpadp1>
Date: Wed, 01 Jul 2020 09:07:57 +0900
From: Daejun Park <daejun7.park@...sung.com>
To: Avri Altman <Avri.Altman@....com>,
Daejun Park <daejun7.park@...sung.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"asutoshd@...eaurora.org" <asutoshd@...eaurora.org>,
"beanhuo@...ron.com" <beanhuo@...ron.com>,
"stanley.chu@...iatek.com" <stanley.chu@...iatek.com>,
"cang@...eaurora.org" <cang@...eaurora.org>,
"bvanassche@....org" <bvanassche@....org>,
"tomas.winkler@...el.com" <tomas.winkler@...el.com>,
ALIM AKHTAR <alim.akhtar@...sung.com>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Sang-yoon Oh <sangyoon.oh@...sung.com>,
Sung-Jun Park <sungjun07.park@...sung.com>,
yongmyung lee <ymhungry.lee@...sung.com>,
Jinyoung CHOI <j-young.choi@...sung.com>,
Adel Choi <adel.choi@...sung.com>,
BoRam Shin <boram.shin@...sung.com>
Subject: RE: [PATCH v4 3/5] scsi: ufs: Introduce HPB module
Hi Avri,
> +static int ufshpb_get_dev_info(struct ufs_hba *hba,
> > + struct ufshpb_dev_info *hpb_dev_info,
> > + u8 *desc_buf)
> > +{
> > + int ret;
> > + int version;
> > + u8 hpb_mode;
> Maybe before doing anything, first verify that all descriptors are in the proper size?
Before reading descriptor, ufshcd_map_desc_id_to_length() may check descriptor size.
So I deleted size checking codes.
static int ufshpb_read_desc(struct ufs_hba *hba, u8 desc_id, u8 desc_index,
u8 selector, u8 *desc_buf)
{
int err = 0;
int size;
-> ufshcd_map_desc_id_to_length(hba, desc_id, &size);
pm_runtime_get_sync(hba->dev);
err = ufshcd_query_descriptor_retry(hba, UPIU_QUERY_OPCODE_READ_DESC,
desc_id, desc_index,
selector,
desc_buf, &size);
> > +#define UFSHPB_WRITE_BUFFER_ID 0x02
> Should be 0x01 for HPB1.0
OK.
Thanks,
Daejun
Powered by blists - more mailing lists