[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6bcd5f74352a63fb96de1640ea4b453f150a88f5.camel@gmail.com>
Date: Sat, 06 Feb 2021 10:14:55 +0100
From: Bean Huo <huobean@...il.com>
To: Can Guo <cang@...eaurora.org>, daejun7.park@...sung.com
Cc: Greg KH <gregkh@...uxfoundation.org>, avri.altman@....com,
jejb@...ux.ibm.com, martin.petersen@...cle.com,
asutoshd@...eaurora.org, stanley.chu@...iatek.com,
bvanassche@....org, ALIM AKHTAR <alim.akhtar@...sung.com>,
linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
Sung-Jun Park <sungjun07.park@...sung.com>,
yongmyung lee <ymhungry.lee@...sung.com>,
Jinyoung CHOI <j-young.choi@...sung.com>,
BoRam Shin <boram.shin@...sung.com>,
SEUNGUK SHIN <seunguk.shin@...sung.com>
Subject: Re: [PATCH v19 2/3] scsi: ufs: L2P map management for HPB read
On Sat, 2021-02-06 at 15:23 +0800, Can Guo wrote:
> > + dev_dbg(&hpb->sdev_ufs_lu->sdev_dev, "Noti: #ACT %u #INACT
> > %u\n",
> > + rsp_field->active_rgn_cnt, rsp_field-
> > >inactive_rgn_cnt);
> > +
> > + queue_work(ufshpb_wq, &hpb->map_work);
> > +}
> > +
> > +/*
> > + * This function will parse recommended active subregion
> > information
> > in sense
> > + * data field of response UPIU with SAM_STAT_GOOD state.
> > + */
> > +void ufshpb_rsp_upiu(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> > +{
> > + struct ufshpb_lu *hpb = ufshpb_get_hpb_data(lrbp->cmd-
> > >device);
> > + struct utp_hpb_rsp *rsp_field;
> > + int data_seg_len;
> > +
> > + if (!hpb)
> > + return;
>
> You are assuming HPB recommandations only come in responses to LUs
> with HPB enabled, but the specs says the recommandations can come
> in any responses with GOOD status, meaning you should check the *hpb
> which belongs to the LUN in res_field, but not the one belongs to
> lrbp->cmd->device.
>
correct, see here HPB driver patch :).
https://patchwork.kernel.org/project/linux-scsi/patch/20200504142032.16619-6-beanhuo@micron.com/
+
+#if defined(CONFIG_SCSI_UFSHPB)
+ /*
+ * HPB recommendations are provided in RESPONSE
UPIU
+ * packets of successfully completed commands,
which
+ * are commands terminated with GOOD status.
+ */
+ if (scsi_status == SAM_STAT_GOOD)
+ ufshpb_rsp_handler(hba, lrbp);
+#endif
break;
case UPIU_TRANSACTION_REJECT_UPIU:
/* TODO: handle Reject UPIU Response */
we need re-test this series patch seriously.
Thanks Can.
Bean
> Regards,
>
> Can Guo
Powered by blists - more mailing lists