diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2013-07-24 16:22:57 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-07-24 22:49:57 -0700 |
commit | 5290801c23231c8e192943d3beb01fdbeb536395 (patch) | |
tree | 856e2e7008c6c4d01085a073b64a0a7fa47f1745 /drivers/misc/mei/client.c | |
parent | cc33c537c12f36e9ce753c308999cc2e93195112 (diff) |
mei: wake also writers on reset
wake writers otherwise might have processes waiting
endlessly on wait_tx during reset
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/client.c')
-rw-r--r-- | drivers/misc/mei/client.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 21d3f5aa835..af1e6020514 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -892,18 +892,22 @@ void mei_cl_all_disconnect(struct mei_device *dev) /** - * mei_cl_all_read_wakeup - wake up all readings so they can be interrupted + * mei_cl_all_wakeup - wake up all readers and writers they can be interrupted * * @dev - mei device */ -void mei_cl_all_read_wakeup(struct mei_device *dev) +void mei_cl_all_wakeup(struct mei_device *dev) { struct mei_cl *cl, *next; list_for_each_entry_safe(cl, next, &dev->file_list, link) { if (waitqueue_active(&cl->rx_wait)) { - dev_dbg(&dev->pdev->dev, "Waking up client!\n"); + dev_dbg(&dev->pdev->dev, "Waking up reading client!\n"); wake_up_interruptible(&cl->rx_wait); } + if (waitqueue_active(&cl->tx_wait)) { + dev_dbg(&dev->pdev->dev, "Waking up writing client!\n"); + wake_up_interruptible(&cl->tx_wait); + } } } |