Skip to content
Snippets Groups Projects
Commit 859b33c9 authored by Wesley Sheng's avatar Wesley Sheng Committed by Bin Meng
Browse files

nvme: Correct the prps per page calculation method


Each prp is 8 bytes, calculate the number of prps
per page should just divide page size by 8
there is no need to minus 1

Signed-off-by: default avatarWesley Sheng <wesleyshenggit@sina.com>
Reviewed-by: Bin Meng's avatarBin Meng <bmeng.cn@gmail.com>
parent b12f6237
No related branches found
No related tags found
No related merge requests found
......@@ -81,7 +81,7 @@ static int nvme_setup_prps(struct nvme_dev *dev, u64 *prp2,
u64 *prp_pool;
int length = total_len;
int i, nprps;
u32 prps_per_page = (page_size >> 3) - 1;
u32 prps_per_page = page_size >> 3;
u32 num_pages;
length -= (page_size - offset);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment