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

Commit 5cf8b2a9 authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman
Browse files

mei: amthif: allow only one request at a time



A next amthif write can be executed only after the previous one has
completed.

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 62e8e6ad
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -315,6 +315,14 @@ int mei_amthif_write(struct mei_cl *cl, struct mei_cl_cb *cb)
	dev = cl->dev;
	dev = cl->dev;


	list_add_tail(&cb->list, &dev->amthif_cmd_list.list);
	list_add_tail(&cb->list, &dev->amthif_cmd_list.list);

	/*
	 * The previous request is still in processing, queue this one.
	 */
	if (dev->iamthif_state > MEI_IAMTHIF_IDLE &&
	    dev->iamthif_state < MEI_IAMTHIF_READ_COMPLETE)
		return 0;

	return mei_amthif_run_next_cmd(dev);
	return mei_amthif_run_next_cmd(dev);
}
}