summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/acpi/nfit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/acpi/nfit.c')
-rw-r--r--kernel/drivers/acpi/nfit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/drivers/acpi/nfit.c b/kernel/drivers/acpi/nfit.c
index 11d8209e6..c097f477c 100644
--- a/kernel/drivers/acpi/nfit.c
+++ b/kernel/drivers/acpi/nfit.c
@@ -1072,11 +1072,12 @@ 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;
+ const u32 STATUS_MASK = 0x80000037;
if (mmio->num_lines)
offset = to_interleave_offset(offset, mmio);
- return readl(mmio->addr.base + offset);
+ return readl(mmio->addr.base + offset) & STATUS_MASK;
}
static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw,
@@ -1805,6 +1806,9 @@ static void acpi_nfit_notify(struct acpi_device *adev, u32 event)
dev_dbg(dev, "%s: event: %d\n", __func__, event);
+ if (event != NFIT_NOTIFY_UPDATE)
+ return;
+
device_lock(dev);
if (!dev->driver) {
/* dev->driver may be null if we're being removed */