aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/init.c')
-rw-r--r--drivers/misc/mei/init.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 79e9e1c30562..15253886f37e 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -132,13 +132,19 @@ EXPORT_SYMBOL_GPL(mei_start);
132void mei_reset(struct mei_device *dev, int interrupts_enabled) 132void mei_reset(struct mei_device *dev, int interrupts_enabled)
133{ 133{
134 bool unexpected; 134 bool unexpected;
135 int ret;
135 136
136 unexpected = (dev->dev_state != MEI_DEV_INITIALIZING && 137 unexpected = (dev->dev_state != MEI_DEV_INITIALIZING &&
137 dev->dev_state != MEI_DEV_DISABLED && 138 dev->dev_state != MEI_DEV_DISABLED &&
138 dev->dev_state != MEI_DEV_POWER_DOWN && 139 dev->dev_state != MEI_DEV_POWER_DOWN &&
139 dev->dev_state != MEI_DEV_POWER_UP); 140 dev->dev_state != MEI_DEV_POWER_UP);
140 141
141 mei_hw_reset(dev, interrupts_enabled); 142 ret = mei_hw_reset(dev, interrupts_enabled);
143 if (ret) {
144 dev_err(&dev->pdev->dev, "hw reset failed disabling the device\n");
145 interrupts_enabled = false;
146 dev->dev_state = MEI_DEV_DISABLED;
147 }
142 148
143 dev->hbm_state = MEI_HBM_IDLE; 149 dev->hbm_state = MEI_HBM_IDLE;
144 150