Skip to content

Commit

Permalink
nfit, nd_blk: BLK status register is only 32 bits
Browse files Browse the repository at this point in the history
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.pdf

Signed-off-by: Ross Zwisler <[email protected]>
Reported-by: Nicholas Moulin <[email protected]>
Tested-by: Nicholas Moulin <[email protected]>
Reviewed-by: Jeff Moyer <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
Ross Zwisler authored and djbw committed Aug 25, 2015
1 parent cbfe8fa commit de4a196
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/acpi/nfit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1024,15 +1024,15 @@ static void wmb_blk(struct nfit_blk *nfit_blk)
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];
u64 offset = nfit_blk->stat_offset + mmio->size * bw;

if (mmio->num_lines)
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,
Expand Down

0 comments on commit de4a196

Please sign in to comment.