Skip to content

Commit de4a196

Browse files
Ross Zwislerdjbw
authored andcommitted
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.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]>
1 parent cbfe8fa commit de4a196

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/acpi/nfit.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,15 +1024,15 @@ static void wmb_blk(struct nfit_blk *nfit_blk)
10241024
wmb_pmem();
10251025
}
10261026

1027-
static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
1027+
static u32 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
10281028
{
10291029
struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR];
10301030
u64 offset = nfit_blk->stat_offset + mmio->size * bw;
10311031

10321032
if (mmio->num_lines)
10331033
offset = to_interleave_offset(offset, mmio);
10341034

1035-
return readq(mmio->base + offset);
1035+
return readl(mmio->base + offset);
10361036
}
10371037

10381038
static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw,

0 commit comments

Comments
 (0)