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: Bean Huo <beanhuo@micron.com>
Signed-off-by: Po-Wen Kao <powen.kao@mediatek.com>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Po-Wen Kao 2022-04-12 15:31:28 +08:00 committed by Martin K. Petersen
parent 3a6a7187f0
commit 25a0bf213b

View file

@ -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);