mei: bus: enable non-blocking RX
Enable non-blocking receive for drivers on mei bus, this allows checking for data availability by mei client drivers. This is most effective for fixed address clients, that lacks flow control. This function adds new API function mei_cldev_recv_nonblock(), it retuns -EGAIN if function will block. 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
a2eb0fc07f
commit
076802d006
@@ -141,7 +141,7 @@ static int mei_osver(struct mei_cl_device *cldev)
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ret = __mei_cl_recv(cldev->cl, buf, length);
|
||||
ret = __mei_cl_recv(cldev->cl, buf, length, 0);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
@@ -272,7 +272,7 @@ static int mei_nfc_if_version(struct mei_cl *cl,
|
||||
return -ENOMEM;
|
||||
|
||||
ret = 0;
|
||||
bytes_recv = __mei_cl_recv(cl, (u8 *)reply, if_version_length);
|
||||
bytes_recv = __mei_cl_recv(cl, (u8 *)reply, if_version_length, 0);
|
||||
if (bytes_recv < if_version_length) {
|
||||
dev_err(bus->dev, "Could not read IF version\n");
|
||||
ret = -EIO;
|
||||
|
Reference in New Issue
Block a user