summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2013-10-21 22:05:43 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-29 16:20:35 -0700
commitf931f4f3f0e2be1a6c5278ab9488652f98ba2f9c (patch)
tree461018611716a91d31d6d294b81c7682136573d4 /drivers/misc
parent4bff7208f332b2b1d7cf1338e50527441283a198 (diff)
downloadlinux-f931f4f3f0e2be1a6c5278ab9488652f98ba2f9c.tar.bz2
mei: print correct device state during unexpected reset
Move the unexpected state print to the beginning of mei_reset, thus printing right state. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/init.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index c32d45209cc6..f7f3abbe12b6 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -147,6 +147,10 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
dev->dev_state != MEI_DEV_POWER_DOWN &&
dev->dev_state != MEI_DEV_POWER_UP);
+ if (unexpected)
+ dev_warn(&dev->pdev->dev, "unexpected reset: dev_state = %s\n",
+ mei_dev_state_str(dev->dev_state));
+
ret = mei_hw_reset(dev, interrupts_enabled);
if (ret) {
dev_err(&dev->pdev->dev, "hw reset failed disabling the device\n");
@@ -185,10 +189,6 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled)
dev->rd_msg_hdr = 0;
dev->wd_pending = false;
- if (unexpected)
- dev_warn(&dev->pdev->dev, "unexpected reset: dev_state = %s\n",
- mei_dev_state_str(dev->dev_state));
-
if (!interrupts_enabled) {
dev_dbg(&dev->pdev->dev, "intr not enabled end of reset\n");
return;