Commit 25a0bf21 authored by Po-Wen Kao's avatar Po-Wen Kao Committed by Martin K. Petersen
Browse files

scsi: ufs: core: Remove redundant HPB unmap

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 also resolves the issue where HPB WRITE BUFFER is issued before UAC is
cleared.

Link: https://lore.kernel.org/r/20220412073131.10644-1-powen.kao@mediatek.com


Acked-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarPo-Wen Kao <powen.kao@mediatek.com>
Signed-off-by: default avatarBean Huo <beanhuo@micron.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 3a6a7187
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -931,11 +931,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)
{
@@ -2456,8 +2451,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);