diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2016-06-16 10:58:58 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-30 08:36:39 -0400 |
commit | a808c80cdaa83939b220176fcdffca8385d88ba6 (patch) | |
tree | 7664d544ae5d32099384620a92d60bd1cdeeea3d /drivers/misc/mei/interrupt.c | |
parent | 97d549b4d5fca22ebde0798cb8c16c19b4ae837a (diff) |
mei: add read callback on demand for fixed_address clients
The Fixed address clients do not work with the flow control, and the
packet RX callback was allocated upon TX with anticipation of a
following RX. This won't work if the clients with unsolicited Rx. Rather
than preparing read callback upon a write we allocate one directly on
the reciev path if one doesn't exists.
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>
Diffstat (limited to 'drivers/misc/mei/interrupt.c')
-rw-r--r-- | drivers/misc/mei/interrupt.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 8b5e4b4c4c15..44ba90140725 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c | |||
@@ -107,8 +107,14 @@ int mei_cl_irq_read_msg(struct mei_cl *cl, | |||
107 | 107 | ||
108 | cb = list_first_entry_or_null(&cl->rd_pending, struct mei_cl_cb, list); | 108 | cb = list_first_entry_or_null(&cl->rd_pending, struct mei_cl_cb, list); |
109 | if (!cb) { | 109 | if (!cb) { |
110 | cl_err(dev, cl, "pending read cb not found\n"); | 110 | if (!mei_cl_is_fixed_address(cl)) { |
111 | goto out; | 111 | cl_err(dev, cl, "pending read cb not found\n"); |
112 | goto out; | ||
113 | } | ||
114 | cb = mei_cl_alloc_cb(cl, mei_cl_mtu(cl), MEI_FOP_READ, cl->fp); | ||
115 | if (!cb) | ||
116 | goto out; | ||
117 | list_add_tail(&cb->list, &cl->rd_pending); | ||
112 | } | 118 | } |
113 | 119 | ||
114 | if (!mei_cl_is_connected(cl)) { | 120 | if (!mei_cl_is_connected(cl)) { |