From: Alexander Usyskin Date: Tue, 10 Feb 2015 08:36:36 +0000 (+0200) Subject: mei: make device disabled on stop unconditionally X-Git-Tag: v3.16.35~2578 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5fba9e60c6e3ccebcfa4c0fdc6f4bb1d9d881148;p=thirdparty%2Fkernel%2Fstable.git mei: make device disabled on stop unconditionally commit 6c15a8516b8118eb19a59fd0bd22df41b9101c32 upstream. Set the internal device state to to disabled after hardware reset in stop flow. This will cover cases when driver was not brought to disabled state because of an error and in stop flow we wish not to retry the reset. Signed-off-by: Alexander Usyskin Signed-off-by: Tomas Winkler Signed-off-by: Greg Kroah-Hartman Signed-off-by: Luis Henriques --- diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 0069292224815..cf83ce10bcee0 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c @@ -300,6 +300,8 @@ void mei_stop(struct mei_device *dev) dev->dev_state = MEI_DEV_POWER_DOWN; mei_reset(dev); + /* move device to disabled state unconditionally */ + dev->dev_state = MEI_DEV_DISABLED; mutex_unlock(&dev->device_lock);