nvme: Correct the prps per page calculation method
PATCH 1/1 nvme: Correct the prps per page calculation method
From: Wesley Sheng <[email protected]>
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 Wesley Sheng <[email protected]>
--- drivers/nvme/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/nvme.c +1 -1
@@ -79,7 +79,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);
Signature · 1 line
2.25.1
Quoted 12 lines · Wesley Sheng
From: Wesley Sheng <[email protected]>
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 1Signed-off-by Wesley Sheng <[email protected]>--- drivers/nvme/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by Bin Meng <[email protected]>
Quoted 9 lines · Bin Meng
Quoted 7 lines · Wesley Sheng
From: Wesley Sheng <[email protected]>
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
Quoted 7 lines
Quoted 5 lines
Signed-off-by Wesley Sheng <[email protected]>--- drivers/nvme/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Reviewed-by Bin Meng <[email protected]>
applied to u-boot-x86, thanks!