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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +       copied = ufshpb_fill_ppn_from_page(hpb, srgn->mctx, srgn_offset,
> +                                          pre_req->wb.len - offset,
> +                                          &addr[offset]);
> +
> +       if (copied < 0)
> +               goto mctx_error;
> +
> +       offset += copied;
> +       srgn_offset += offset;
This seems wrong.
How come the region offset is affected from the offset inside the pages?

> +
> +       if (srgn_offset == hpb->entries_per_srgn) {
> +               srgn_offset = 0;
> +
> +               if (++srgn_idx == hpb->srgns_per_rgn) {
> +                       srgn_idx = 0;
> +                       rgn_idx++;
> +               }
> +       }
> +
> +       if (offset < pre_req->wb.len)
> +               goto next_offset;
If the 512k resides in a single subregion, and span across pages, fill_ppn should take care of that.
If the 512k spans across subregion regions, than it spans across 2 subregions at most,
and maybe you can use it.




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux