Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync up with Linus #97

Merged
merged 10 commits into from
Aug 27, 2015
Prev Previous commit
Next Next commit
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]>
  • Loading branch information
Ross Zwisler authored and djbw committed Aug 25, 2015
commit de4a196c02a2a2631b516d90da6e8d052ccb07e8
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