Commit 0ef77698 authored by Alexander Usyskin's avatar Alexander Usyskin Committed by Greg Kroah-Hartman
Browse files

mei: bus-fixup: change pxp mode only if message was sent



Move PXP mode state machine to SETUP mode only if
memory ready message sent successfully to the firmware.
Leave it in INIT mode otherwise to allow try to send message later.

Signed-off-by: default avatarAlexander Usyskin <alexander.usyskin@intel.com>
Link: https://lore.kernel.org/r/20221116124735.2493847-3-alexander.usyskin@intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 83f47eea
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -266,12 +266,13 @@ static void mei_gsc_mkhi_fix_ver(struct mei_cl_device *cldev)

	if (cldev->bus->pxp_mode == MEI_DEV_PXP_INIT) {
		ret = mei_gfx_memory_ready(cldev);
		if (ret < 0)
		if (ret < 0) {
			dev_err(&cldev->dev, "memory ready command failed %d\n", ret);
		else
		} else {
			dev_dbg(&cldev->dev, "memory ready command sent\n");
		/* we go to reset after that */
			cldev->bus->pxp_mode = MEI_DEV_PXP_SETUP;
		}
		/* we go to reset after that */
		goto out;
	}