diff options
author | Wesley Sheng <wesleyshenggit@sina.com> | 2021-06-22 06:34:21 +0300 |
---|---|---|
committer | Bin Meng <bmeng.cn@gmail.com> | 2021-06-23 12:21:14 +0300 |
commit | 859b33c948945f7904f60a2c12a3792d356d51ad (patch) | |
tree | eb9601cb30f209820292c8e05a824f4ffd7a3e58 | |
parent | b12f62374e83675bc65174c2b4b7e3c6c368aa78 (diff) | |
download | u-boot-859b33c948945f7904f60a2c12a3792d356d51ad.tar.xz |
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: Wesley Sheng <wesleyshenggit@sina.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
-rw-r--r-- | drivers/nvme/nvme.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvme/nvme.c b/drivers/nvme/nvme.c index d554ec54cb..dc6c39ba10 100644 --- a/drivers/nvme/nvme.c +++ b/drivers/nvme/nvme.c @@ -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); |