summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/hbm.c
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2016-02-08 00:35:41 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-08 01:47:20 +0300
commita816a00ece63d16ade7e9c0ca8b5a7e4c5ea2453 (patch)
tree4ce36a74010f7f8b65d0ab7520c8ad701eda445a /drivers/misc/mei/hbm.c
parent7851e008703e2f7073802e560293213e93dcdde6 (diff)
downloadlinux-a816a00ece63d16ade7e9c0ca8b5a7e4c5ea2453.tar.xz
mei: bus: run rescan on me_clients list change
Since clients can be now added and removed during runtime we need to run bus rescan whenever me_clients list is modified. 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/hbm.c')
-rw-r--r--drivers/misc/mei/hbm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index a2f32b0eb649..0c9310ad6136 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -401,6 +401,9 @@ static int mei_hbm_fw_add_cl_req(struct mei_device *dev,
if (ret)
status = !MEI_HBMS_SUCCESS;
+ if (dev->dev_state == MEI_DEV_ENABLED)
+ schedule_work(&dev->bus_rescan_work);
+
return mei_hbm_add_cl_resp(dev, req->me_addr, status);
}
@@ -789,8 +792,11 @@ static void mei_hbm_cl_connect_res(struct mei_device *dev, struct mei_cl *cl,
cl->state = MEI_FILE_CONNECTED;
else {
cl->state = MEI_FILE_DISCONNECT_REPLY;
- if (rs->status == MEI_CL_CONN_NOT_FOUND)
+ if (rs->status == MEI_CL_CONN_NOT_FOUND) {
mei_me_cl_del(dev, cl->me_cl);
+ if (dev->dev_state == MEI_DEV_ENABLED)
+ schedule_work(&dev->bus_rescan_work);
+ }
}
cl->status = mei_cl_conn_status_to_errno(rs->status);
}