Skip to content

Commit

Permalink
mei: request async autosuspend at the end of enumeration
Browse files Browse the repository at this point in the history
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: <[email protected]> # 4.4+
Signed-off-by: Alexander Usyskin <[email protected]>
Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ausyskin authored and gregkh committed Nov 29, 2016
1 parent ec98960 commit d5f8e16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/mei/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/**
Expand Down

0 comments on commit d5f8e16

Please sign in to comment.