diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2016-12-02 23:15:25 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-12-06 11:05:46 +0100 |
commit | 076802d0061520bc646ee121fe0f34fce6c55a93 (patch) | |
tree | 3c17b6372e44c369649691f8c90822bb3f8ea3e0 /drivers/misc/mei/bus-fixup.c | |
parent | mei: fix the back to back interrupt handling (diff) | |
download | linux-076802d0061520bc646ee121fe0f34fce6c55a93.tar.xz linux-076802d0061520bc646ee121fe0f34fce6c55a93.zip |
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>
Diffstat (limited to 'drivers/misc/mei/bus-fixup.c')
-rw-r--r-- | drivers/misc/mei/bus-fixup.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c index 7f2cef9011ae..18e05ca7584f 100644 --- a/drivers/misc/mei/bus-fixup.c +++ b/drivers/misc/mei/bus-fixup.c @@ -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; |