Linux-SCSI Archive on lore.kernel.org
 help / color / Atom feed
From: Daejun Park <daejun7.park@samsung.com>
To: Avri Altman <Avri.Altman@wdc.com>,
	Daejun Park <daejun7.park@samsung.com>,
	"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"stanley.chu@mediatek.com" <stanley.chu@mediatek.com>,
	"cang@codeaurora.org" <cang@codeaurora.org>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"tomas.winkler@intel.com" <tomas.winkler@intel.com>,
	ALIM AKHTAR <alim.akhtar@samsung.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Sang-yoon Oh <sangyoon.oh@samsung.com>,
	Sung-Jun Park <sungjun07.park@samsung.com>,
	yongmyung lee <ymhungry.lee@samsung.com>,
	Jinyoung CHOI <j-young.choi@samsung.com>,
	Adel Choi <adel.choi@samsung.com>,
	BoRam Shin <boram.shin@samsung.com>
Subject: RE: [PATCH v4 3/5] scsi: ufs: Introduce HPB module
Date: Wed, 01 Jul 2020 09:07:57 +0900
Message-ID: <1087081975.11593562201594.JavaMail.epsvc@epcpadp1> (raw)
In-Reply-To: <SN6PR04MB4640A27B0DCB321B165D59F0FC6F0@SN6PR04MB4640.namprd04.prod.outlook.com>

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

  parent reply index

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200629064323epcms2p787baba58a416fef7fdd3927f8da701da@epcms2p7>
2020-06-29  6:43 ` [PATCH v4 0/5] scsi: ufs: Add Host Performance Booster Support Daejun Park
     [not found]   ` <CGME20200629064323epcms2p787baba58a416fef7fdd3927f8da701da@epcms2p4>
2020-06-29  6:48     ` [PATCH v4 1/5] scsi: ufs: Add UFS feature related parameter Daejun Park
2020-06-29  6:55     ` [PATCH v4 3/5] scsi: ufs: Introduce HPB module Daejun Park
2020-06-30 12:38       ` Avri Altman
     [not found]   ` <CGME20200629064323epcms2p787baba58a416fef7fdd3927f8da701da@epcms2p2>
2020-06-29  6:58     ` [PATCH v4 4/5] scsi: ufs: L2P map management for HPB read Daejun Park
2020-06-30 12:42       ` Avri Altman
2020-06-29  7:31     ` [PATCH v4 5/5] scsi: ufs: Prepare HPB read for cached sub-region Daejun Park
     [not found]   ` <CGME20200629064323epcms2p787baba58a416fef7fdd3927f8da701da@epcms2p3>
2020-06-29  6:50     ` [PATCH v4 2/5] scsi: ufs: Add UFS-feature layer Daejun Park
2020-07-01  0:07     ` Daejun Park [this message]
2020-07-01  0:11     ` [PATCH v4 4/5] scsi: ufs: L2P map management for HPB read Daejun Park

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1087081975.11593562201594.JavaMail.epsvc@epcpadp1 \
    --to=daejun7.park@samsung.com \
    --cc=Avri.Altman@wdc.com \
    --cc=adel.choi@samsung.com \
    --cc=alim.akhtar@samsung.com \
    --cc=asutoshd@codeaurora.org \
    --cc=beanhuo@micron.com \
    --cc=boram.shin@samsung.com \
    --cc=bvanassche@acm.org \
    --cc=cang@codeaurora.org \
    --cc=j-young.choi@samsung.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=sangyoon.oh@samsung.com \
    --cc=stanley.chu@mediatek.com \
    --cc=sungjun07.park@samsung.com \
    --cc=tomas.winkler@intel.com \
    --cc=ymhungry.lee@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-SCSI Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-scsi/0 linux-scsi/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-scsi linux-scsi/ https://lore.kernel.org/linux-scsi \
		linux-scsi@vger.kernel.org
	public-inbox-index linux-scsi

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-scsi


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git