diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2017-01-27 16:32:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-31 11:07:43 +0100 |
commit | 9ecdbc58f96bd145669510822bc44eafde3c7351 (patch) | |
tree | d43063adc2217425fa0abf7901b083ffac7cf12d | |
parent | 6537ae2f20412dd1c7464272dfff77d5afb50d25 (diff) | |
download | op-kernel-dev-9ecdbc58f96bd145669510822bc44eafde3c7351.zip op-kernel-dev-9ecdbc58f96bd145669510822bc44eafde3c7351.tar.gz |
mei: amthif: allow the read completion after close
The amthif client connection is shared over multiple file descriptors.
In case a file descriptor was closed immediately after a write, the read
credits should be still available so the pending reads can be cleaned
from the queue, hence we cannot drop the control read list, this is
done only upon connection close.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/mei/amthif.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 466afb2..2d553cd 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c @@ -353,9 +353,9 @@ int mei_amthif_release(struct mei_device *dev, struct file *file) dev->iamthif_canceled = true; } + /* Don't clean ctrl_rd_list here, the reads has to be completed */ mei_clear_list(file, &dev->amthif_cmd_list.list); mei_clear_list(file, &cl->rd_completed); - mei_clear_list(file, &dev->ctrl_rd_list.list); return 0; } |