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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
97d549b4d5
commit
a808c80cda
@@ -107,8 +107,14 @@ int mei_cl_irq_read_msg(struct mei_cl *cl,
|
||||
|
||||
cb = list_first_entry_or_null(&cl->rd_pending, struct mei_cl_cb, list);
|
||||
if (!cb) {
|
||||
cl_err(dev, cl, "pending read cb not found\n");
|
||||
goto out;
|
||||
if (!mei_cl_is_fixed_address(cl)) {
|
||||
cl_err(dev, cl, "pending read cb not found\n");
|
||||
goto out;
|
||||
}
|
||||
cb = mei_cl_alloc_cb(cl, mei_cl_mtu(cl), MEI_FOP_READ, cl->fp);
|
||||
if (!cb)
|
||||
goto out;
|
||||
list_add_tail(&cb->list, &cl->rd_pending);
|
||||
}
|
||||
|
||||
if (!mei_cl_is_connected(cl)) {
|
||||
|
Reference in New Issue
Block a user