summaryrefslogtreecommitdiff
path: root/drivers/misc/mei
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2014-05-12 12:19:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-06 18:54:15 -0700
commit83a03fda3d14ba6c097f0f4cdd86a8b9d9ed633a (patch)
tree933b6c561be15805c232a2c0a1c2d08132f75160 /drivers/misc/mei
parent8c6fa0a671dc12ee3dd658dafbd1d4a7fec2250d (diff)
downloadlinux-3.10-83a03fda3d14ba6c097f0f4cdd86a8b9d9ed633a.tar.gz
linux-3.10-83a03fda3d14ba6c097f0f4cdd86a8b9d9ed633a.tar.bz2
linux-3.10-83a03fda3d14ba6c097f0f4cdd86a8b9d9ed633a.zip
mei: me: read H_CSR after asserting reset
commit c40765d919d25d2d44d99c4ce39e48808f137e1e upstream. According the spec the host should read H_CSR again after asserting reset H_RST to ensure that reset was read by the firmware Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r--drivers/misc/mei/hw-me.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index 06311c5ada3..b9ce2437887 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -186,7 +186,19 @@ static void mei_me_hw_reset(struct mei_device *dev, bool intr_enable)
dev->recvd_hw_ready = false;
mei_me_reg_write(hw, H_CSR, hcsr);
- if (dev->dev_state == MEI_DEV_POWER_DOWN)
+ /*
+ * Host reads the H_CSR once to ensure that the
+ * posted write to H_CSR completes.
+ */
+ hcsr = mei_hcsr_read(hw);
+
+ if ((hcsr & H_RST) == 0)
+ dev_warn(&dev->pdev->dev, "H_RST is not set = 0x%08X", hcsr);
+
+ if ((hcsr & H_RDY) == H_RDY)
+ dev_warn(&dev->pdev->dev, "H_RDY is not cleared 0x%08X", hcsr);
+
+ if (intr_enable == false)
mei_me_hw_reset_release(dev);
dev_dbg(&dev->pdev->dev, "current HCSR = 0x%08x.\n", mei_hcsr_read(hw));