public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] mei: add timeout to send
@ 2022-11-16 12:47 Alexander Usyskin
  2022-11-16 12:47 ` [PATCH v3 1/2] " Alexander Usyskin
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Alexander Usyskin @ 2022-11-16 12:47 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
	David Airlie, Daniel Vetter, Tvrtko Ursulin
  Cc: Tomas Winkler, Alexander Usyskin, Vitaly Lubart, intel-gfx,
	linux-kernel

When driver wakes up the firmware from the low power state,
it is sending a memory ready message.
The send is done via synchronous/blocking function to ensure
that firmware is in ready state. However, in case of firmware
undergoing reset send might be block forever.
To address this issue a timeout is added to blocking
write command on the internal bus.

Introduce the __mei_cl_send_timeout function to use instead of
__mei_cl_send in cases where timeout is required.
The mei_cl_write has only two callers and there is no need to split
it into two functions.

V2: address review comments:
 - split __mei_cl_send and __mei_cl_send_timeout
 - add units to timeout KDoc
 - use MAX_SCHEDULE_TIMEOUT to squash wait to one macro

V3: - split the state fix into separate patch
    - document define unit
    - expand timeout KDoc

Alexander Usyskin (2):
  mei: add timeout to send
  mei: bus-fixup: change pxp mode only if message was sent

 drivers/misc/mei/bus-fixup.c | 14 +++++++++-----
 drivers/misc/mei/bus.c       | 22 +++++++++++++++++++++-
 drivers/misc/mei/client.c    | 20 ++++++++++++++++----
 drivers/misc/mei/client.h    |  2 +-
 drivers/misc/mei/main.c      |  2 +-
 drivers/misc/mei/mei_dev.h   |  2 ++
 6 files changed, 50 insertions(+), 12 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-11-30 17:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-16 12:47 [PATCH v3 0/2] mei: add timeout to send Alexander Usyskin
2022-11-16 12:47 ` [PATCH v3 1/2] " Alexander Usyskin
2022-11-16 12:47 ` [PATCH v3 2/2] mei: bus-fixup: change pxp mode only if message was sent Alexander Usyskin
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox