linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] scsi: ufs: remove redundant HPB unmap
@ 2022-04-12  7:31 Po-Wen Kao
  2022-04-12 15:06 ` Bean Huo
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Po-Wen Kao @ 2022-04-12  7:31 UTC (permalink / raw)
  To: Alim Akhtar, Avri Altman, James E.J. Bottomley,
	Martin K. Petersen, Matthias Brugger
  Cc: wsd_upstream, peter.wang, stanley.chu, powen.kao, alice.chao,
	chun-hung.wu, cc.chou, chaotian.jing, jiajie.hao, huobean,
	yohan.joung, jason.li, linux-scsi, linux-kernel,
	linux-arm-kernel, linux-mediatek

Since the HPB mapping is already reset in ufshpb_init by setting
flag QUERY_FLAG_IDN_HPB_RESET, there is no need doing so again in
ufshpb_hpb_lu_prepared.

This would also resolve the issue where HPB WRTIE BUFFER is issued
before UAC being cleared.

Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com>
---
 drivers/scsi/ufs/ufshpb.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/scsi/ufs/ufshpb.c b/drivers/scsi/ufs/ufshpb.c
index a86d0cc50de2..5c09d44c4bd5 100644
--- a/drivers/scsi/ufs/ufshpb.c
+++ b/drivers/scsi/ufs/ufshpb.c
@@ -934,11 +934,6 @@ static int ufshpb_issue_umap_single_req(struct ufshpb_lu *hpb,
 	return ufshpb_issue_umap_req(hpb, rgn, true);
 }
 
-static int ufshpb_issue_umap_all_req(struct ufshpb_lu *hpb)
-{
-	return ufshpb_issue_umap_req(hpb, NULL, false);
-}
-
 static void __ufshpb_evict_region(struct ufshpb_lu *hpb,
 				 struct ufshpb_region *rgn)
 {
@@ -2459,8 +2454,6 @@ static void ufshpb_hpb_lu_prepared(struct ufs_hba *hba)
 			ufshpb_set_state(hpb, HPB_PRESENT);
 			if ((hpb->lu_pinned_end - hpb->lu_pinned_start) > 0)
 				queue_work(ufshpb_wq, &hpb->map_work);
-			if (!hpb->is_hcm)
-				ufshpb_issue_umap_all_req(hpb);
 		} else {
 			dev_err(hba->dev, "destroy HPB lu %d\n", hpb->lun);
 			ufshpb_destroy_lu(hba, sdev);
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-04-26  4:01 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12  7:31 [PATCH 1/1] scsi: ufs: remove redundant HPB unmap Po-Wen Kao
2022-04-12 15:06 ` Bean Huo
2022-04-12 15:20   ` Bean Huo
2022-04-13  3:53     ` Peter Wang
2022-04-13 12:43       ` Bean Huo
2022-04-14  4:49     ` Po-Wen Kao
2022-04-14 22:07       ` Bean Huo
2022-04-13 21:29 ` Bean Huo
2022-04-26  4:00 ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).