lkml.org 
[lkml]   [2017]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] libnvdimm: fix phys_addr for nvdimm_clear_poison
On 04/25, Toshi Kani wrote:
> nvdimm_clear_poison() expects a physical address, not an offset.
> Fix nsio_rw_bytes() to call nvdimm_clear_poison() with a physical
> address.

Good catch!

>
> Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: Vishal Verma <vishal.l.verma@intel.com>
> ---
> drivers/nvdimm/claim.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c
> index ca6d572..0b31073 100644
> --- a/drivers/nvdimm/claim.c
> +++ b/drivers/nvdimm/claim.c
> @@ -254,7 +254,8 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
> && (!ndns->claim || !is_nd_btt(ndns->claim))) {
> long cleared;
>
> - cleared = nvdimm_clear_poison(&ndns->dev, offset, size);
> + cleared = nvdimm_clear_poison(&ndns->dev,
> + nsio->res.start + offset, size);

Should we be using nsio->res.start here or nsio->addr ?

> if (cleared < size)
> rc = -EIO;
> if (cleared > 0 && cleared / 512) {

\
 
 \ /
  Last update: 2017-04-25 23:46    [W:0.047 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site