[staging-next] staging/mei: fix failure for multiple mei clients connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Natalia Ovsyanikov <natalia.ovsyanikov@xxxxxxxxx>

The irq handler processes queued mei clients connect requests, which were
not transferred to the device in ioctl context due to unavailability
of the write buffer.

The handler may transfer the connection request only if there is
no other ongoing  requests for the same mei id.
This condition was implemented inversely which depending on
the write buffer availability lead to seemingly random
failures during connection attempts.

Cc: Oren Weil <oren.jer.weil@xxxxxxxxx>
Signed-off-by: Natalia Ovsyanikov <natalia.ovsyanikov@xxxxxxxxx>
Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx>
---
 drivers/staging/mei/interrupt.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/staging/mei/interrupt.c b/drivers/staging/mei/interrupt.c
index 38e0197..ad944b2 100644
--- a/drivers/staging/mei/interrupt.c
+++ b/drivers/staging/mei/interrupt.c
@@ -1328,7 +1328,7 @@ static int mei_irq_thread_write_handler(struct mei_io_list *cmpl_list,
 			break;
 		case MEI_IOCTL:
 			/* connect message */
-			if (!mei_other_client_is_connecting(dev, cl))
+			if (mei_other_client_is_connecting(dev, cl))
 				continue;
 			ret = _mei_irq_thread_ioctl(dev, slots, pos, cl, cmpl_list);
 			if (ret)
-- 
1.7.4.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux