> >         kmem_cache_destroy(hpb->map_req_cache);
> > @@ -1670,7 +2109,7 @@ void ufshpb_init_hpb_lu(struct ufs_hba *hba, struct
> > scsi_device *sdev)
> >         if (ret)
> >                 goto out;
> > 
> > -       hpb = ufshpb_alloc_hpb_lu(hba, lun, &hba->ufshpb_dev,
> > +       hpb = ufshpb_alloc_hpb_lu(hba, sdev, &hba->ufshpb_dev,
> >                                   &hpb_lu_info);
> >         if (!hpb)
> >                 goto out;
> In HPB2.0 device control mode, the host is expected to send HPB-WRITE-BUFFER 
> 0x3
> To informs that all HPB Regions are inactive (expect for pinned regions).
> Maybe a good place to do so is here, or in ufshpb_hpb_lu_prepared after you 
> kicked the map work for pinned regions.

Done

> Either way, If you decide to do so, I would appreciate if you could align to 
> the framework I proposed in
> (scsi: ufshpb: Region inactivation in host mode).
> This way you would have a wrapper unmap_all that would call 
> ufshpb_issue_umap_req with buffer id 0x3,
> And I would have a wrapper unmap_single that would call it with buffer id 0x1.

I will do this way on the next patch.

Thanks,
Daejun

Reply via email to