Thread (33 messages) 33 messages, 5 authors, 2021-02-10

Re: [PATCH v19 2/3] scsi: ufs: L2P map management for HPB read

From: Bean Huo <hidden>
Date: 2021-02-06 09:17:11
Also in: lkml

On Sat, 2021-02-06 at 15:23 +0800, Can Guo wrote:
quoted
+     dev_dbg(&hpb->sdev_ufs_lu->sdev_dev, "Noti: #ACT %u #INACT
%u\n",
+             rsp_field->active_rgn_cnt, rsp_field-
quoted
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-
quoted
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
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help