RE: [PATCH v19 3/3] scsi: ufs: Prepare HPB read for cached sub-region

From: Avri Altman
Date: Wed Feb 10 2021 - 04:41:04 EST


> +static bool ufshpb_test_ppn_dirty(struct ufshpb_lu *hpb, int rgn_idx,
> + int srgn_idx, int srgn_offset, int cnt)
> +{
> + struct ufshpb_region *rgn;
> + struct ufshpb_subregion *srgn;
> + int bitmap_len = hpb->entries_per_srgn;
> + int bit_len;
> +
> +next_srgn:
> + rgn = hpb->rgn_tbl + rgn_idx;
> + srgn = rgn->srgn_tbl + srgn_idx;
> +
> + if (!ufshpb_is_valid_srgn(rgn, srgn))
> + return true;
The subregion is changing its state to issued, only in ufshpb_issue_map_req.
Although you already know that those physical addresses are no longer valid in ufshpb_update_active_info.
Can we mark that this subregion is no longer valid earlier, so not to keep sending faulty HPB-READ to that subregion?

Thanks,
Avri