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

2021-03-10 Thread Can Guo
Hi Daejun, On 2021-03-09 09:38, Can Guo wrote: Hi Daejun, If you are about to push Ver.27, please hold on. I run into OCP issues on VCCQ every time after apply this patch. The issue can be work around by disabling runtime PM. Before you or we figure out where the BUG is, it is pointless to push

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

2021-03-08 Thread Can Guo
Hi Daejun, If you are about to push Ver.27, please hold on. I run into OCP issues on VCCQ every time after apply this patch. The issue can be work around by disabling runtime PM. Before you or we figure out where the BUG is, it is pointless to push next version. Regards, Can Guo. On 2021-03-03

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

2021-03-04 Thread Daejun Park
Hi Bean, > > + > > +static inline int ufshpb_get_read_id(struct ufshpb_lu *hpb) > > +{ > > + if (++hpb->cur_read_id >= MAX_HPB_READ_ID) > > + hpb->cur_read_id = 0; > > + return hpb->cur_read_id; > > +} > > + > > +static int ufshpb_execute_pre_req(struct ufshpb_lu *hpb, st

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

2021-03-04 Thread Daejun Park
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: >

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

2021-03-04 Thread Daejun Park
Hi Bean, > > + > > +static inline void ufshpb_put_pre_req(struct ufshpb_lu *hpb, > > + struct ufshpb_req *pre_req) > > +{ > > + pre_req->req = NULL; > > + pre_req->bio = NULL; > > + list_add_tail(&pre_req->list_req, &hpb->lh_pre_req_free); > >

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

2021-03-04 Thread Bean Huo
On Wed, 2021-03-03 at 15:29 +0900, Daejun Park wrote: > + > +static inline int ufshpb_get_read_id(struct ufshpb_lu *hpb) > +{ > + if (++hpb->cur_read_id >= MAX_HPB_READ_ID) > + hpb->cur_read_id = 0; > + return hpb->cur_read_id; > +} > + > +static int ufshpb_execute_pre_req

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

2021-03-04 Thread Can Guo
On 2021-03-03 22:50, Bean Huo wrote: On Wed, 2021-03-03 at 15:29 +0900, Daejun Park wrote: + +static inline void ufshpb_put_pre_req(struct ufshpb_lu *hpb, + struct ufshpb_req *pre_req) +{ + pre_req->req = NULL; + pre_req->bio = NULL; + list_a

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

2021-03-04 Thread Can Guo
On 2021-03-03 14:29, Daejun Park wrote: This patch supports the HPB 2.0. The HPB 2.0 supports read of varying sizes from 4KB to 512KB. In the case of Read (<= 32KB) is supported as single HPB read. In the case of Read (36KB ~ 512KB) is supported by as a combination of write buffer command and HP

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

2021-03-03 Thread Can Guo
- if (!ufshpb_is_support_chunk(transfer_len)) - return; + if (!ufshpb_is_support_chunk(hpb, transfer_len) && + (ufshpb_is_legacy(hba) && (transfer_len != HPB_LEGACY_CHUNK_HIGH))) + return 0; This is looks awkward, can we put the checks in ufshpb_i

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

2021-03-03 Thread Bean Huo
On Wed, 2021-03-03 at 15:29 +0900, Daejun Park wrote: > + > +static inline void ufshpb_put_pre_req(struct ufshpb_lu *hpb, > + struct ufshpb_req *pre_req) > +{ > + pre_req->req = NULL; > + pre_req->bio = NULL; > + list_add_tail(&pre_req->list_req

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

2021-03-03 Thread Daejun Park
This patch supports the HPB 2.0. The HPB 2.0 supports read of varying sizes from 4KB to 512KB. In the case of Read (<= 32KB) is supported as single HPB read. In the case of Read (36KB ~ 512KB) is supported by as a combination of write buffer command and HPB read command to deliver more PPN. The wr