diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-25 20:26:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-08-25 20:26:00 -0400 |
commit | f045fd755fe9ba2b15265cd237d6ae5d924689d3 (patch) | |
tree | 8caf75fd898a67bfb6af019a96f96a800f21d1c9 | |
parent | b1713b135fb1ae4d52531a55f0687f985bffe271 (diff) | |
parent | de4a196c02a2a2631b516d90da6e8d052ccb07e8 (diff) |
Merge branch 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm
Pull nvdimm fix from Dan Williams:
"A single fix for status register read size in the nd_blk driver.
The effect of getting the width of this register read wrong is that
all I/O fails when the read returns non-zero. Given the availability
of ACPI 6 NFIT enabled platforms, this could reasonably wait to come
in during the 4.3 merge window with a tag for 4.2-stable. Otherwise,
this makes the 4.2 kernel fully functional with devices that conform
to the mmio-block-apertures defined in the ACPI 6 NFIT (NVDIMM
Firmware Interface Table)"
* 'libnvdimm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
nfit, nd_blk: BLK status register is only 32 bits
-rw-r--r-- | drivers/acpi/nfit.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c index 628a42c41ab1..bb29e56276bd 100644 --- a/drivers/acpi/nfit.c +++ b/drivers/acpi/nfit.c | |||
@@ -1024,7 +1024,7 @@ static void wmb_blk(struct nfit_blk *nfit_blk) | |||
1024 | wmb_pmem(); | 1024 | wmb_pmem(); |
1025 | } | 1025 | } |
1026 | 1026 | ||
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) |
1028 | { | 1028 | { |
1029 | struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR]; | 1029 | struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR]; |
1030 | u64 offset = nfit_blk->stat_offset + mmio->size * bw; | 1030 | 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 | if (mmio->num_lines) | 1032 | if (mmio->num_lines) |
1033 | offset = to_interleave_offset(offset, mmio); | 1033 | offset = to_interleave_offset(offset, mmio); |
1034 | 1034 | ||
1035 | return readq(mmio->base + offset); | 1035 | return readl(mmio->base + offset); |
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw, | 1038 | static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw, |