From 8d52af6795c0480a20272159103976a893603fde Mon Sep 17 00:00:00 2001 From: Tomas Winkler Date: Tue, 12 Dec 2017 13:27:06 +0200 Subject: mei: speed up the power down flow When mei driver is powering down due to suspend or shutdown it will iterate over the mei client bus and disconnect each client device attached in turn. The power down flow consist of the link rest, which causes all clients get disconnected at once, hence the individual disconnection can be omitted and significantly reduce power down flow. Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/hw-me.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/misc/mei/hw-me.c') diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c index 10dcf4ff99a5..0b21f9ec00f5 100644 --- a/drivers/misc/mei/hw-me.c +++ b/drivers/misc/mei/hw-me.c @@ -1260,7 +1260,9 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id) if (rets == -ENODATA) break; - if (rets && dev->dev_state != MEI_DEV_RESETTING) { + 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); -- cgit v1.2.3