]> xenbits.xensource.com Git - people/iwj/linux.git/commitdiff
mei: make device disabled on stop unconditionally
authorAlexander Usyskin <alexander.usyskin@intel.com>
Tue, 10 Feb 2015 08:36:36 +0000 (10:36 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 18 Mar 2015 12:31:27 +0000 (13:31 +0100)
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 <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/init.c

index cdd31c2a2a2bf095e827758e3d71567d80557a5f..b2965382d0ececa9cf92e6ca654d23cb90c28c1b 100644 (file)
@@ -275,6 +275,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);