From: Alexander Usyskin <alexander.usyskin@intel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jani Nikula <jani.nikula@linux.intel.com>,
Joonas Lahtinen <joonas.lahtinen@linux.intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>,
David Airlie <airlied@redhat.com>,
Daniel Vetter <daniel@ffwll.ch>,
Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: linux-kernel@vger.kernel.org,
Tomas Winkler <tomas.winkler@intel.com>,
Alexander Usyskin <alexander.usyskin@intel.com>,
Vitaly Lubart <vitaly.lubart@intel.com>,
intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH v3 2/2] mei: bus-fixup: change pxp mode only if message was sent
Date: Wed, 16 Nov 2022 14:47:35 +0200 [thread overview]
Message-ID: <20221116124735.2493847-3-alexander.usyskin@intel.com> (raw)
In-Reply-To: <20221116124735.2493847-1-alexander.usyskin@intel.com>
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: Alexander Usyskin <alexander.usyskin@intel.com>
---
drivers/misc/mei/bus-fixup.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c
index 90023c34666e..6df7679d9739 100644
--- a/drivers/misc/mei/bus-fixup.c
+++ b/drivers/misc/mei/bus-fixup.c
@@ -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");
+ cldev->bus->pxp_mode = MEI_DEV_PXP_SETUP;
+ }
/* we go to reset after that */
- cldev->bus->pxp_mode = MEI_DEV_PXP_SETUP;
goto out;
}
--
2.34.1
next prev parent reply other threads:[~2022-11-16 12:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-16 12:47 [Intel-gfx] [PATCH v3 0/2] mei: add timeout to send Alexander Usyskin
2022-11-16 12:47 ` [Intel-gfx] [PATCH v3 1/2] " Alexander Usyskin
2022-11-16 12:47 ` Alexander Usyskin [this message]
2022-11-16 21:49 ` [Intel-gfx] ✓ Fi.CI.BAT: success for mei: add timeout to send (rev3) Patchwork
2022-11-17 0:46 ` Matt Roper
2022-11-17 7:24 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-11-30 14:20 ` [Intel-gfx] [PATCH v3 0/2] mei: add timeout to send Rodrigo Vivi
2022-11-30 17:43 ` Greg Kroah-Hartman
2022-11-30 17:48 ` Vivi, Rodrigo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221116124735.2493847-3-alexander.usyskin@intel.com \
--to=alexander.usyskin@intel.com \
--cc=airlied@redhat.com \
--cc=daniel@ffwll.ch \
--cc=gregkh@linuxfoundation.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@linux.intel.com \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=tomas.winkler@intel.com \
--cc=tvrtko.ursulin@linux.intel.com \
--cc=vitaly.lubart@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox