mei: me: fix reset policy on read error in interrupt
Avoid link reset in DISABLED and POWERING_DOWN state if read error is occurred - let shutdown flow finish. In any state exit interrupt handler if read error occurred. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Link: https://lore.kernel.org/r/20220215080438.264876-3-tomas.winkler@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
685867f40c
commit
04af137c6a
|
@ -1293,12 +1293,14 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
|
|||
if (rets == -ENODATA)
|
||||
break;
|
||||
|
||||
if (rets &&
|
||||
(dev->dev_state != MEI_DEV_RESETTING &&
|
||||
dev->dev_state != MEI_DEV_POWER_DOWN)) {
|
||||
dev_err(dev->dev, "mei_irq_read_handler ret = %d.\n",
|
||||
rets);
|
||||
schedule_work(&dev->reset_work);
|
||||
if (rets) {
|
||||
dev_err(dev->dev, "mei_irq_read_handler ret = %d, state = %d.\n",
|
||||
rets, dev->dev_state);
|
||||
if (dev->dev_state != MEI_DEV_RESETTING &&
|
||||
dev->dev_state != MEI_DEV_DISABLED &&
|
||||
dev->dev_state != MEI_DEV_POWERING_DOWN &&
|
||||
dev->dev_state != MEI_DEV_POWER_DOWN)
|
||||
schedule_work(&dev->reset_work);
|
||||
goto end;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue