summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/init.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-01-09 01:07:27 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-09 04:40:47 +0400
commitadfba3220b625ce4bee08e7e6f48c8a27aac23bb (patch)
treebe763cb3537e28f43bb43df856bdbe82bc2bdbbd /drivers/misc/mei/init.c
parent528c8eb4e7c08c5531533de62a558aaf3d076ebb (diff)
downloadlinux-adfba3220b625ce4bee08e7e6f48c8a27aac23bb.tar.xz
mei: don't use cached value for hcsr in mei_hw_reset
Open code mei_hw_reset to avoid using cached hcsr. Using cached hcsr can cause unwanted side effects. Move mei_hw_restet function to hw-me.c as it is hw dependent Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/init.c')
-rw-r--r--drivers/misc/mei/init.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 2391832bfa6f..5c2054d06f6b 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -170,22 +170,6 @@ out:
}
/**
- * mei_hw_reset - resets fw via mei csr register.
- *
- * @dev: the device structure
- * @interrupts_enabled: if interrupt should be enabled after reset.
- */
-static void mei_hw_reset(struct mei_device *dev, int interrupts_enabled)
-{
- dev->host_hw_state |= (H_RST | H_IG);
-
- if (interrupts_enabled)
- mei_enable_interrupts(dev);
- else
- mei_disable_interrupts(dev);
-}
-
-/**
* mei_reset - resets host and fw.
*
* @dev: the device structure
@@ -207,20 +191,8 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
dev->dev_state != MEI_DEV_POWER_DOWN &&
dev->dev_state != MEI_DEV_POWER_UP);
- dev->host_hw_state = mei_hcsr_read(dev);
-
- dev_dbg(&dev->pdev->dev, "before reset host_hw_state = 0x%08x.\n",
- dev->host_hw_state);
-
mei_hw_reset(dev, interrupts_enabled);
- dev->host_hw_state &= ~H_RST;
- dev->host_hw_state |= H_IG;
-
- mei_hcsr_set(dev);
-
- dev_dbg(&dev->pdev->dev, "currently saved host_hw_state = 0x%08x.\n",
- dev->host_hw_state);
if (dev->dev_state != MEI_DEV_INITIALIZING) {
if (dev->dev_state != MEI_DEV_DISABLED &&