mei: me: release hw from reset only during the reset flow
authorAlexander Usyskin <alexander.usyskin@intel.com>
Sun, 25 Jan 2015 21:45:28 +0000 (23:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Feb 2015 23:48:51 +0000 (15:48 -0800)
We might enter the interrupt handler with hw_ready already set,
but prior we actually started the reset flow.
To soleve this we move the reset release from the interrupt handler
to the HW start wait function which is part of the reset sequence.

Cc: <stable@vger.kernel.org> #3.10+
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/hw-me.c

index ccc1b405ca212c6ebb8159ca0ebd4f317b80870e..f8fd503dfbd69b09cc192c655127cf9aeb950e77 100644 (file)
@@ -335,6 +335,7 @@ static int mei_me_hw_ready_wait(struct mei_device *dev)
                return -ETIME;
        }
 
+       mei_me_hw_reset_release(dev);
        dev->recvd_hw_ready = false;
        return 0;
 }
@@ -731,9 +732,7 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
        /*  check if we need to start the dev */
        if (!mei_host_is_ready(dev)) {
                if (mei_hw_is_ready(dev)) {
-                       mei_me_hw_reset_release(dev);
                        dev_dbg(dev->dev, "we need to start the dev.\n");
-
                        dev->recvd_hw_ready = true;
                        wake_up(&dev->wait_hw_ready);
                } else {