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
@@ -115,10 +115,14 @@ enum mei_cb_file_ops {
|
||||
*
|
||||
* @MEI_CL_IO_TX_BLOCKING: send is blocking
|
||||
* @MEI_CL_IO_TX_INTERNAL: internal communication between driver and FW
|
||||
*
|
||||
* @MEI_CL_IO_RX_NONBLOCK: recv is non-blocking
|
||||
*/
|
||||
enum mei_cl_io_mode {
|
||||
MEI_CL_IO_TX_BLOCKING = BIT(0),
|
||||
MEI_CL_IO_TX_INTERNAL = BIT(1),
|
||||
|
||||
MEI_CL_IO_RX_NONBLOCK = BIT(2),
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -319,7 +323,8 @@ void mei_cl_bus_rescan_work(struct work_struct *work);
|
||||
void mei_cl_bus_dev_fixup(struct mei_cl_device *dev);
|
||||
ssize_t __mei_cl_send(struct mei_cl *cl, u8 *buf, size_t length,
|
||||
unsigned int mode);
|
||||
ssize_t __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length);
|
||||
ssize_t __mei_cl_recv(struct mei_cl *cl, u8 *buf, size_t length,
|
||||
unsigned int mode);
|
||||
bool mei_cl_bus_rx_event(struct mei_cl *cl);
|
||||
bool mei_cl_bus_notify_event(struct mei_cl *cl);
|
||||
void mei_cl_bus_remove_devices(struct mei_device *bus);
|
||||
|
Reference in New Issue
Block a user