Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1328596 > unrolled thread
| Started by | Tomas Winkler <tomas.winkler@intel.com> |
|---|---|
| First post | 2016-02-07 22:40 +0100 |
| Last post | 2016-02-07 22:40 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[char-misc-next 18/27] mei: wake blocked write on link reset Tomas Winkler <tomas.winkler@intel.com> - 2016-02-07 22:40 +0100
| From | Tomas Winkler <tomas.winkler@intel.com> |
|---|---|
| Date | 2016-02-07 22:40 +0100 |
| Subject | [char-misc-next 18/27] mei: wake blocked write on link reset |
| Message-ID | <qZFdL-3BZ-7@gated-at.bofh.it> |
From: Alexander Usyskin <alexander.usyskin@intel.com>
In case of link reset all blocked writes should be interrupted.
Note, that currently blocking write is used only through bus layer.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/misc/mei/client.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 3fd070a698ce..5ddc690752c2 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -1691,7 +1691,8 @@ out:
mutex_unlock(&dev->device_lock);
rets = wait_event_interruptible(cl->tx_wait,
- cl->writing_state == MEI_WRITE_COMPLETE);
+ cl->writing_state == MEI_WRITE_COMPLETE ||
+ (!mei_cl_is_connected(cl)));
mutex_lock(&dev->device_lock);
/* wait_event_interruptible returns -ERESTARTSYS */
if (rets) {
@@ -1699,6 +1700,10 @@ out:
rets = -EINTR;
goto err;
}
+ if (cl->writing_state != MEI_WRITE_COMPLETE) {
+ rets = -EFAULT;
+ goto err;
+ }
}
rets = size;
--
2.4.3
Back to top | Article view | linux.kernel
csiph-web