Skip to content

Commit

Permalink
mei: amthif: allow the read completion after close
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Jan 31, 2017
1 parent 6537ae2 commit 9ecdbc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/mei/amthif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 9ecdbc5

Please sign in to comment.