diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2017-01-27 15:32:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-31 11:07:43 +0100 |
commit | 6c0d6701a551ac344e63935535db0494110c5f4e (patch) | |
tree | d2ed26a724a3af2f49cd0ef3ee1698f33135317d /drivers/misc/mei/client.c | |
parent | mei: return error on notification request to a disconnected client (diff) | |
download | linux-6c0d6701a551ac344e63935535db0494110c5f4e.tar.xz linux-6c0d6701a551ac344e63935535db0494110c5f4e.zip |
mei: abort waiting for notification on unsupported HW
On legacy HW, pre Skylake, the notifications are not supported,
return -EOPNOTSUPP in mei_cl_notify_get and prevent
waiting indefinitely.
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/client.c')
-rw-r--r-- | drivers/misc/mei/client.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index ecfaef93457d..923fad39535c 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -1428,6 +1428,11 @@ int mei_cl_notify_get(struct mei_cl *cl, bool block, bool *notify_ev) dev = cl->dev; + if (!dev->hbm_f_ev_supported) { + cl_dbg(dev, cl, "notifications not supported\n"); + return -EOPNOTSUPP; + } + if (!mei_cl_is_connected(cl)) return -ENODEV; |