diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-06-23 15:49:04 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-24 19:33:28 -0400 |
commit | 9049f7932109f3fe189ffa8028f2e23f06a9bd0b (patch) | |
tree | 1f5dc15a64dc0d478148abe85909ae9476db20f8 /drivers/misc/mei | |
parent | c20c68d535409f2ff000415d5e0578529c016521 (diff) |
mei: check whether hw start has succeeded
hw start may fail therefore the reset flow has
to check for the return value
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei')
-rw-r--r-- | drivers/misc/mei/init.c | 7 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 4 |
2 files changed, 8 insertions, 3 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 15253886f37e..6fc573cef178 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c | |||
@@ -181,7 +181,12 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) | |||
181 | return; | 181 | return; |
182 | } | 182 | } |
183 | 183 | ||
184 | mei_hw_start(dev); | 184 | ret = mei_hw_start(dev); |
185 | if (ret) { | ||
186 | dev_err(&dev->pdev->dev, "hw_start failed disabling the device\n"); | ||
187 | dev->dev_state = MEI_DEV_DISABLED; | ||
188 | return; | ||
189 | } | ||
185 | 190 | ||
186 | dev_dbg(&dev->pdev->dev, "link is established start sending messages.\n"); | 191 | dev_dbg(&dev->pdev->dev, "link is established start sending messages.\n"); |
187 | /* link is established * start sending messages. */ | 192 | /* link is established * start sending messages. */ |
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 1aa499782abe..7b918b2fb894 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -544,9 +544,9 @@ static inline int mei_hw_reset(struct mei_device *dev, bool enable) | |||
544 | return dev->ops->hw_reset(dev, enable); | 544 | return dev->ops->hw_reset(dev, enable); |
545 | } | 545 | } |
546 | 546 | ||
547 | static inline void mei_hw_start(struct mei_device *dev) | 547 | static inline int mei_hw_start(struct mei_device *dev) |
548 | { | 548 | { |
549 | dev->ops->hw_start(dev); | 549 | return dev->ops->hw_start(dev); |
550 | } | 550 | } |
551 | 551 | ||
552 | static inline void mei_clear_interrupts(struct mei_device *dev) | 552 | static inline void mei_clear_interrupts(struct mei_device *dev) |