Commit de4a196c authored by Ross Zwisler's avatar Ross Zwisler Committed by Dan Williams

nfit, nd_blk: BLK status register is only 32 bits

Only read 32 bits for the BLK status register in read_blk_stat().

The format and size of this register is defined in the
"NVDIMM Driver Writer's guide":

http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdfSigned-off-by: default avatarRoss Zwisler <ross.zwisler@linux.intel.com>
Reported-by: default avatarNicholas Moulin <nicholas.w.moulin@linux.intel.com>
Tested-by: default avatarNicholas Moulin <nicholas.w.moulin@linux.intel.com>
Reviewed-by: default avatarJeff Moyer <jmoyer@redhat.com>
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent cbfe8fa6
...@@ -1024,7 +1024,7 @@ static void wmb_blk(struct nfit_blk *nfit_blk) ...@@ -1024,7 +1024,7 @@ static void wmb_blk(struct nfit_blk *nfit_blk)
wmb_pmem(); wmb_pmem();
} }
static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw) static u32 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
{ {
struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR]; struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR];
u64 offset = nfit_blk->stat_offset + mmio->size * bw; u64 offset = nfit_blk->stat_offset + mmio->size * bw;
...@@ -1032,7 +1032,7 @@ static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw) ...@@ -1032,7 +1032,7 @@ static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
if (mmio->num_lines) if (mmio->num_lines)
offset = to_interleave_offset(offset, mmio); offset = to_interleave_offset(offset, mmio);
return readq(mmio->base + offset); return readl(mmio->base + offset);
} }
static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw, static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment