aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/hbm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc/mei/hbm.c')
-rw-r--r--drivers/misc/mei/hbm.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index e7b7aad0999b..5e305d2605f3 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -301,7 +301,10 @@ static int mei_hbm_enum_clients_req(struct mei_device *dev)
301 enum_req = (struct hbm_host_enum_request *)dev->wr_msg.data; 301 enum_req = (struct hbm_host_enum_request *)dev->wr_msg.data;
302 memset(enum_req, 0, len); 302 memset(enum_req, 0, len);
303 enum_req->hbm_cmd = HOST_ENUM_REQ_CMD; 303 enum_req->hbm_cmd = HOST_ENUM_REQ_CMD;
304 enum_req->allow_add = dev->hbm_f_dc_supported; 304 enum_req->flags |= dev->hbm_f_dc_supported ?
305 MEI_HBM_ENUM_F_ALLOW_ADD : 0;
306 enum_req->flags |= dev->hbm_f_ie_supported ?
307 MEI_HBM_ENUM_F_IMMEDIATE_ENUM : 0;
305 308
306 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data); 309 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data);
307 if (ret) { 310 if (ret) {
@@ -401,6 +404,9 @@ static int mei_hbm_fw_add_cl_req(struct mei_device *dev,
401 if (ret) 404 if (ret)
402 status = !MEI_HBMS_SUCCESS; 405 status = !MEI_HBMS_SUCCESS;
403 406
407 if (dev->dev_state == MEI_DEV_ENABLED)
408 schedule_work(&dev->bus_rescan_work);
409
404 return mei_hbm_add_cl_resp(dev, req->me_addr, status); 410 return mei_hbm_add_cl_resp(dev, req->me_addr, status);
405} 411}
406 412
@@ -543,7 +549,7 @@ static int mei_hbm_prop_req(struct mei_device *dev)
543 /* We got all client properties */ 549 /* We got all client properties */
544 if (next_client_index == MEI_CLIENTS_MAX) { 550 if (next_client_index == MEI_CLIENTS_MAX) {
545 dev->hbm_state = MEI_HBM_STARTED; 551 dev->hbm_state = MEI_HBM_STARTED;
546 schedule_work(&dev->init_work); 552 mei_host_client_init(dev);
547 553
548 return 0; 554 return 0;
549 } 555 }
@@ -789,8 +795,11 @@ static void mei_hbm_cl_connect_res(struct mei_device *dev, struct mei_cl *cl,
789 cl->state = MEI_FILE_CONNECTED; 795 cl->state = MEI_FILE_CONNECTED;
790 else { 796 else {
791 cl->state = MEI_FILE_DISCONNECT_REPLY; 797 cl->state = MEI_FILE_DISCONNECT_REPLY;
792 if (rs->status == MEI_CL_CONN_NOT_FOUND) 798 if (rs->status == MEI_CL_CONN_NOT_FOUND) {
793 mei_me_cl_del(dev, cl->me_cl); 799 mei_me_cl_del(dev, cl->me_cl);
800 if (dev->dev_state == MEI_DEV_ENABLED)
801 schedule_work(&dev->bus_rescan_work);
802 }
794 } 803 }
795 cl->status = mei_cl_conn_status_to_errno(rs->status); 804 cl->status = mei_cl_conn_status_to_errno(rs->status);
796} 805}
@@ -866,7 +875,7 @@ static int mei_hbm_fw_disconnect_req(struct mei_device *dev,
866 875
867 cl = mei_hbm_cl_find_by_cmd(dev, disconnect_req); 876 cl = mei_hbm_cl_find_by_cmd(dev, disconnect_req);
868 if (cl) { 877 if (cl) {
869 cl_dbg(dev, cl, "fw disconnect request received\n"); 878 cl_warn(dev, cl, "fw disconnect request received\n");
870 cl->state = MEI_FILE_DISCONNECTING; 879 cl->state = MEI_FILE_DISCONNECTING;
871 cl->timer_count = 0; 880 cl->timer_count = 0;
872 881
@@ -972,6 +981,9 @@ static void mei_hbm_config_features(struct mei_device *dev)
972 if (dev->version.major_version >= HBM_MAJOR_VERSION_DC) 981 if (dev->version.major_version >= HBM_MAJOR_VERSION_DC)
973 dev->hbm_f_dc_supported = 1; 982 dev->hbm_f_dc_supported = 1;
974 983
984 if (dev->version.major_version >= HBM_MAJOR_VERSION_IE)
985 dev->hbm_f_ie_supported = 1;
986
975 /* disconnect on connect timeout instead of link reset */ 987 /* disconnect on connect timeout instead of link reset */
976 if (dev->version.major_version >= HBM_MAJOR_VERSION_DOT) 988 if (dev->version.major_version >= HBM_MAJOR_VERSION_DOT)
977 dev->hbm_f_dot_supported = 1; 989 dev->hbm_f_dot_supported = 1;
@@ -979,6 +991,10 @@ static void mei_hbm_config_features(struct mei_device *dev)
979 /* Notification Event Support */ 991 /* Notification Event Support */
980 if (dev->version.major_version >= HBM_MAJOR_VERSION_EV) 992 if (dev->version.major_version >= HBM_MAJOR_VERSION_EV)
981 dev->hbm_f_ev_supported = 1; 993 dev->hbm_f_ev_supported = 1;
994
995 /* Fixed Address Client Support */
996 if (dev->version.major_version >= HBM_MAJOR_VERSION_FA)
997 dev->hbm_f_fa_supported = 1;
982} 998}
983 999
984/** 1000/**