Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bddf56f authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman
Browse files

mei: amthif: use rx_wait queue also for amthif client



Switch using cl->rx_wait wait queue also for amthif, there is nothing
special about amthif in that matter in Rx flow.
The cl->wait is reserved for hbm flows and asynchronous events

Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 77b007b1
Loading
Loading
Loading
Loading
+5 −5
Original line number Original line Diff line number Diff line
@@ -121,7 +121,7 @@ int mei_amthif_read(struct mei_device *dev, struct file *file,
		/* unlock the Mutex */
		/* unlock the Mutex */
		mutex_unlock(&dev->device_lock);
		mutex_unlock(&dev->device_lock);


		wait_ret = wait_event_interruptible(dev->iamthif_cl.wait,
		wait_ret = wait_event_interruptible(cl->rx_wait,
					!list_empty(&cl->rd_completed));
					!list_empty(&cl->rd_completed));


		/* Locking again the Mutex */
		/* Locking again the Mutex */
@@ -316,7 +316,7 @@ unsigned int mei_amthif_poll(struct mei_device *dev,
{
{
	unsigned int mask = 0;
	unsigned int mask = 0;


	poll_wait(file, &dev->iamthif_cl.wait, wait);
	poll_wait(file, &dev->iamthif_cl.rx_wait, wait);


	if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE &&
	if (dev->iamthif_state == MEI_IAMTHIF_READ_COMPLETE &&
	    dev->iamthif_fp == file) {
	    dev->iamthif_fp == file) {
@@ -411,7 +411,7 @@ void mei_amthif_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
		 * so it can be propagated to the reader
		 * so it can be propagated to the reader
		 */
		 */
		list_add_tail(&cb->list, &cl->rd_completed);
		list_add_tail(&cb->list, &cl->rd_completed);
		wake_up_interruptible(&dev->iamthif_cl.wait);
		wake_up_interruptible(&cl->rx_wait);
		return;
		return;
	}
	}


@@ -425,7 +425,7 @@ void mei_amthif_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
	}
	}


	dev_dbg(dev->dev, "completing amthif call back.\n");
	dev_dbg(dev->dev, "completing amthif call back.\n");
	wake_up_interruptible(&dev->iamthif_cl.wait);
	wake_up_interruptible(&cl->rx_wait);
}
}


/**
/**