Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1529150

[char-misc-next] mei: request async autosuspend at the end of enumeration

From Tomas Winkler <tomas.winkler@intel.com>
Newsgroups linux.kernel
Subject [char-misc-next] mei: request async autosuspend at the end of enumeration
Date 2016-11-24 11:40 +0100
Message-ID <sGZBE-1sc-29@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Alexander Usyskin <alexander.usyskin@intel.com>

pm_runtime_autosuspend can take synchronous or asynchronous
paths, Because we are calling pm_runtime_mark_last_busy just before
this most of the cases it takes the asynchronous way. However,
when the FW or driver resets during already running runtime suspend,
the call will result in calling to the driver's rpm callback and results
in a deadlock on device_lock.
The simplest fix is to replace pm_runtime_autosuspend with
asynchronous pm_request_autosuspend.

Cc: <stable@vger.kernel.org> # 4.4+
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
 drivers/misc/mei/client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
index 9635b14b6011..391936c1aa04 100644
--- a/drivers/misc/mei/client.c
+++ b/drivers/misc/mei/client.c
@@ -691,7 +691,7 @@ void mei_host_client_init(struct mei_device *dev)
 
 	pm_runtime_mark_last_busy(dev->dev);
 	dev_dbg(dev->dev, "rpm: autosuspend\n");
-	pm_runtime_autosuspend(dev->dev);
+	pm_request_autosuspend(dev->dev);
 }
 
 /**
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[char-misc-next] mei: request async autosuspend at the end of enumeration Tomas Winkler <tomas.winkler@intel.com> - 2016-11-24 11:40 +0100
  RE: [char-misc-next] mei: request async autosuspend at the end of  enumeration "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-11-24 17:20 +0100
    Re: [char-misc-next] mei: request async autosuspend at the end of  enumeration Jeff King <peff@peff.net> - 2016-11-24 22:00 +0100
      RE: [char-misc-next] mei: request async autosuspend at the end of  enumeration "Winkler, Tomas" <tomas.winkler@intel.com> - 2016-11-24 23:40 +0100
        Re: [char-misc-next] mei: request async autosuspend at the end of  enumeration Jeff King <peff@peff.net> - 2016-11-25 04:20 +0100

csiph-web