scsi: ufs: ufshpb: Do not send umap_all in host control mode

HPB WRITE BUFFER with buffer-id = 0x3h is supported in device control mode
only.

Link: https://lore.kernel.org/r/20210712095039.8093-11-avri.altman@wdc.com
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Avri Altman 2021-07-12 12:50:37 +03:00 committed by Martin K. Petersen
parent 33845a2d84
commit 1afb7ddadc

View file

@ -2458,7 +2458,8 @@ 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);
ufshpb_issue_umap_all_req(hpb);
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);