RE: [PATCH v32 4/4] scsi: ufs: Add HPB 2.0 support

From: Avri Altman
Date: Wed Apr 14 2021 - 05:07:38 EST


> From: Daejun Park <daejun7.park@xxxxxxxxxxx>
>
> @@ -1692,6 +2188,7 @@ 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);
> HPB-WRITE-BUFFER with buffer-id = 0x3h is supported in device control mode
> only
> so I think it is necessary to distinguish device mode and host mode.
You are correct.
Since Daejun's driver's scope is device mode only - see ufshpb_get_dev_info,
This needs to be fixed in the host mode series.
I will fix it in my next version.

Thanks,
Avri

> } else {
> dev_err(hba->dev, "destroy HPB lu %d\n", hpb->lun);
> ufshpb_destroy_lu(hba, sdev);
>