3 * Intel Management Engine Interface (Intel MEI) Linux driver
4 * Copyright (c) 2003-2012, Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
17 #include <linux/export.h>
18 #include <linux/pci.h>
19 #include <linux/sched.h>
20 #include <linux/wait.h>
21 #include <linux/mei.h>
22 #include <linux/pm_runtime.h>
28 static const char *mei_cl_conn_status_str(enum mei_cl_connect_status status)
30 #define MEI_CL_CS(status) case MEI_CL_CONN_##status: return #status
34 MEI_CL_CS(ALREADY_STARTED);
35 MEI_CL_CS(OUT_OF_RESOURCES);
36 MEI_CL_CS(MESSAGE_SMALL);
37 default: return "unknown";
43 * mei_cl_conn_status_to_errno - convert client connect response
44 * status to error code
46 * @status: client connect response status
48 * returns corresponding error code
50 static int mei_cl_conn_status_to_errno(enum mei_cl_connect_status status)
53 case MEI_CL_CONN_SUCCESS: return 0;
54 case MEI_CL_CONN_NOT_FOUND: return -ENOTTY;
55 case MEI_CL_CONN_ALREADY_STARTED: return -EBUSY;
56 case MEI_CL_CONN_OUT_OF_RESOURCES: return -EBUSY;
57 case MEI_CL_CONN_MESSAGE_SMALL: return -EINVAL;
58 default: return -EINVAL;
63 * mei_hbm_idle - set hbm to idle state
65 * @dev: the device structure
67 void mei_hbm_idle(struct mei_device *dev)
69 dev->init_clients_timer = 0;
70 dev->hbm_state = MEI_HBM_IDLE;
74 * mei_me_cl_remove_all - remove all me clients
76 * @dev: the device structure
78 static void mei_me_cl_remove_all(struct mei_device *dev)
80 struct mei_me_client *me_cl, *next;
81 list_for_each_entry_safe(me_cl, next, &dev->me_clients, list) {
82 list_del(&me_cl->list);
88 * mei_hbm_reset - reset hbm counters and book keeping data structurs
90 * @dev: the device structure
92 void mei_hbm_reset(struct mei_device *dev)
94 dev->me_client_presentation_num = 0;
95 dev->me_client_index = 0;
97 mei_me_cl_remove_all(dev);
103 * mei_hbm_cl_hdr - construct client hbm header
106 * @hbm_cmd: host bus message command
107 * @buf: buffer for cl header
108 * @len: buffer length
111 void mei_hbm_cl_hdr(struct mei_cl *cl, u8 hbm_cmd, void *buf, size_t len)
113 struct mei_hbm_cl_cmd *cmd = buf;
117 cmd->hbm_cmd = hbm_cmd;
118 cmd->host_addr = cl->host_client_id;
119 cmd->me_addr = cl->me_client_id;
123 * mei_hbm_cl_write - write simple hbm client message
125 * @dev: the device structure
127 * @hbm_cmd: host bus message command
128 * @len: buffer length
131 int mei_hbm_cl_write(struct mei_device *dev,
132 struct mei_cl *cl, u8 hbm_cmd, size_t len)
134 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
136 mei_hbm_hdr(mei_hdr, len);
137 mei_hbm_cl_hdr(cl, hbm_cmd, dev->wr_msg.data, len);
139 return mei_write_message(dev, mei_hdr, dev->wr_msg.data);
143 * mei_hbm_cl_addr_equal - tells if they have the same address
146 * @buf: buffer with cl header
148 * returns true if addresses are the same
151 bool mei_hbm_cl_addr_equal(struct mei_cl *cl, void *buf)
153 struct mei_hbm_cl_cmd *cmd = buf;
154 return cl->host_client_id == cmd->host_addr &&
155 cl->me_client_id == cmd->me_addr;
159 int mei_hbm_start_wait(struct mei_device *dev)
162 if (dev->hbm_state > MEI_HBM_START)
165 mutex_unlock(&dev->device_lock);
166 ret = wait_event_interruptible_timeout(dev->wait_recvd_msg,
167 dev->hbm_state == MEI_HBM_IDLE ||
168 dev->hbm_state >= MEI_HBM_STARTED,
169 mei_secs_to_jiffies(MEI_HBM_TIMEOUT));
170 mutex_lock(&dev->device_lock);
172 if (ret <= 0 && (dev->hbm_state <= MEI_HBM_START)) {
173 dev->hbm_state = MEI_HBM_IDLE;
174 dev_err(&dev->pdev->dev, "waiting for mei start failed\n");
181 * mei_hbm_start_req - sends start request message.
183 * @dev: the device structure
185 * returns 0 on success and < 0 on failure
187 int mei_hbm_start_req(struct mei_device *dev)
189 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
190 struct hbm_host_version_request *start_req;
191 const size_t len = sizeof(struct hbm_host_version_request);
196 mei_hbm_hdr(mei_hdr, len);
198 /* host start message */
199 start_req = (struct hbm_host_version_request *)dev->wr_msg.data;
200 memset(start_req, 0, len);
201 start_req->hbm_cmd = HOST_START_REQ_CMD;
202 start_req->host_version.major_version = HBM_MAJOR_VERSION;
203 start_req->host_version.minor_version = HBM_MINOR_VERSION;
205 dev->hbm_state = MEI_HBM_IDLE;
206 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data);
208 dev_err(&dev->pdev->dev, "version message write failed: ret = %d\n",
213 dev->hbm_state = MEI_HBM_START;
214 dev->init_clients_timer = MEI_CLIENTS_INIT_TIMEOUT;
219 * mei_hbm_enum_clients_req - sends enumeration client request message.
221 * @dev: the device structure
223 * returns 0 on success and < 0 on failure
225 static int mei_hbm_enum_clients_req(struct mei_device *dev)
227 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
228 struct hbm_host_enum_request *enum_req;
229 const size_t len = sizeof(struct hbm_host_enum_request);
232 /* enumerate clients */
233 mei_hbm_hdr(mei_hdr, len);
235 enum_req = (struct hbm_host_enum_request *)dev->wr_msg.data;
236 memset(enum_req, 0, len);
237 enum_req->hbm_cmd = HOST_ENUM_REQ_CMD;
239 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data);
241 dev_err(&dev->pdev->dev, "enumeration request write failed: ret = %d.\n",
245 dev->hbm_state = MEI_HBM_ENUM_CLIENTS;
246 dev->init_clients_timer = MEI_CLIENTS_INIT_TIMEOUT;
251 * mei_hbm_me_cl_add - add new me client to the list
253 * @dev: the device structure
254 * @res: hbm property response
256 * returns 0 on success and -ENOMEM on allocation failure
259 static int mei_hbm_me_cl_add(struct mei_device *dev,
260 struct hbm_props_response *res)
262 struct mei_me_client *me_cl;
264 me_cl = kzalloc(sizeof(struct mei_me_client), GFP_KERNEL);
268 me_cl->props = res->client_properties;
269 me_cl->client_id = res->me_addr;
270 me_cl->mei_flow_ctrl_creds = 0;
272 list_add(&me_cl->list, &dev->me_clients);
277 * mei_hbm_prop_req - request property for a single client
279 * @dev: the device structure
281 * returns 0 on success and < 0 on failure
284 static int mei_hbm_prop_req(struct mei_device *dev)
287 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
288 struct hbm_props_request *prop_req;
289 const size_t len = sizeof(struct hbm_props_request);
290 unsigned long next_client_index;
293 next_client_index = find_next_bit(dev->me_clients_map, MEI_CLIENTS_MAX,
294 dev->me_client_index);
296 /* We got all client properties */
297 if (next_client_index == MEI_CLIENTS_MAX) {
298 dev->hbm_state = MEI_HBM_STARTED;
299 schedule_work(&dev->init_work);
304 mei_hbm_hdr(mei_hdr, len);
305 prop_req = (struct hbm_props_request *)dev->wr_msg.data;
307 memset(prop_req, 0, sizeof(struct hbm_props_request));
309 prop_req->hbm_cmd = HOST_CLIENT_PROPERTIES_REQ_CMD;
310 prop_req->me_addr = next_client_index;
312 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data);
314 dev_err(&dev->pdev->dev, "properties request write failed: ret = %d\n",
319 dev->init_clients_timer = MEI_CLIENTS_INIT_TIMEOUT;
320 dev->me_client_index = next_client_index;
326 * mei_hbm_pg - sends pg command
328 * @dev: the device structure
329 * @pg_cmd: the pg command code
331 * This function returns -EIO on write failure
333 int mei_hbm_pg(struct mei_device *dev, u8 pg_cmd)
335 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
336 struct hbm_power_gate *req;
337 const size_t len = sizeof(struct hbm_power_gate);
340 mei_hbm_hdr(mei_hdr, len);
342 req = (struct hbm_power_gate *)dev->wr_msg.data;
344 req->hbm_cmd = pg_cmd;
346 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data);
348 dev_err(&dev->pdev->dev, "power gate command write failed.\n");
351 EXPORT_SYMBOL_GPL(mei_hbm_pg);
354 * mei_hbm_stop_req - send stop request message
359 * This function returns -EIO on write failure
361 static int mei_hbm_stop_req(struct mei_device *dev)
363 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
364 struct hbm_host_stop_request *req =
365 (struct hbm_host_stop_request *)dev->wr_msg.data;
366 const size_t len = sizeof(struct hbm_host_stop_request);
368 mei_hbm_hdr(mei_hdr, len);
371 req->hbm_cmd = HOST_STOP_REQ_CMD;
372 req->reason = DRIVER_STOP_REQUEST;
374 return mei_write_message(dev, mei_hdr, dev->wr_msg.data);
378 * mei_hbm_cl_flow_control_req - sends flow control request.
380 * @dev: the device structure
383 * This function returns -EIO on write failure
385 int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl)
387 const size_t len = sizeof(struct hbm_flow_control);
388 cl_dbg(dev, cl, "sending flow control\n");
389 return mei_hbm_cl_write(dev, cl, MEI_FLOW_CONTROL_CMD, len);
393 * mei_hbm_add_single_flow_creds - adds single buffer credentials.
395 * @dev: the device structure
396 * @flow: flow control.
398 * return 0 on success, < 0 otherwise
400 static int mei_hbm_add_single_flow_creds(struct mei_device *dev,
401 struct hbm_flow_control *flow)
403 struct mei_me_client *me_cl;
405 me_cl = mei_me_cl_by_id(dev, flow->me_addr);
407 dev_err(&dev->pdev->dev, "no such me client %d\n",
412 if (WARN_ON(me_cl->props.single_recv_buf == 0))
415 me_cl->mei_flow_ctrl_creds++;
416 dev_dbg(&dev->pdev->dev, "recv flow ctrl msg ME %d (single) creds = %d.\n",
417 flow->me_addr, me_cl->mei_flow_ctrl_creds);
423 * mei_hbm_cl_flow_control_res - flow control response from me
425 * @dev: the device structure
426 * @flow_control: flow control response bus message
428 static void mei_hbm_cl_flow_control_res(struct mei_device *dev,
429 struct hbm_flow_control *flow_control)
433 if (!flow_control->host_addr) {
434 /* single receive buffer */
435 mei_hbm_add_single_flow_creds(dev, flow_control);
439 /* normal connection */
440 list_for_each_entry(cl, &dev->file_list, link) {
441 if (mei_hbm_cl_addr_equal(cl, flow_control)) {
442 cl->mei_flow_ctrl_creds++;
443 dev_dbg(&dev->pdev->dev, "flow ctrl msg for host %d ME %d creds %d.\n",
444 flow_control->host_addr, flow_control->me_addr,
445 cl->mei_flow_ctrl_creds);
453 * mei_hbm_cl_disconnect_req - sends disconnect message to fw.
455 * @dev: the device structure
456 * @cl: a client to disconnect from
458 * This function returns -EIO on write failure
460 int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl)
462 const size_t len = sizeof(struct hbm_client_connect_request);
463 return mei_hbm_cl_write(dev, cl, CLIENT_DISCONNECT_REQ_CMD, len);
467 * mei_hbm_cl_disconnect_rsp - sends disconnect respose to the FW
469 * @dev: the device structure
470 * @cl: a client to disconnect from
472 * This function returns -EIO on write failure
474 int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl)
476 const size_t len = sizeof(struct hbm_client_connect_response);
477 return mei_hbm_cl_write(dev, cl, CLIENT_DISCONNECT_RES_CMD, len);
481 * mei_hbm_cl_disconnect_res - disconnect response from ME
483 * @dev: the device structure
484 * @rs: disconnect response bus message
486 static void mei_hbm_cl_disconnect_res(struct mei_device *dev,
487 struct hbm_client_connect_response *rs)
490 struct mei_cl_cb *cb, *next;
492 dev_dbg(&dev->pdev->dev, "hbm: disconnect response cl:host=%02d me=%02d status=%d\n",
493 rs->me_addr, rs->host_addr, rs->status);
495 list_for_each_entry_safe(cb, next, &dev->ctrl_rd_list.list, list) {
498 /* this should not happen */
504 if (mei_hbm_cl_addr_equal(cl, rs)) {
506 if (rs->status == MEI_CL_DISCONN_SUCCESS)
507 cl->state = MEI_FILE_DISCONNECTED;
517 * mei_hbm_cl_connect_req - send connection request to specific me client
519 * @dev: the device structure
520 * @cl: a client to connect to
522 * returns -EIO on write failure
524 int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl)
526 const size_t len = sizeof(struct hbm_client_connect_request);
527 return mei_hbm_cl_write(dev, cl, CLIENT_CONNECT_REQ_CMD, len);
531 * mei_hbm_cl_connect_res - connect response from the ME
533 * @dev: the device structure
534 * @rs: connect response bus message
536 static void mei_hbm_cl_connect_res(struct mei_device *dev,
537 struct hbm_client_connect_response *rs)
541 struct mei_cl_cb *cb, *next;
543 dev_dbg(&dev->pdev->dev, "hbm: connect response cl:host=%02d me=%02d status=%s\n",
544 rs->me_addr, rs->host_addr,
545 mei_cl_conn_status_str(rs->status));
549 list_for_each_entry_safe(cb, next, &dev->ctrl_rd_list.list, list) {
552 /* this should not happen */
554 list_del_init(&cb->list);
558 if (cb->fop_type != MEI_FOP_CONNECT)
561 if (mei_hbm_cl_addr_equal(cl, rs)) {
571 if (rs->status == MEI_CL_CONN_SUCCESS)
572 cl->state = MEI_FILE_CONNECTED;
574 cl->state = MEI_FILE_DISCONNECTED;
575 cl->status = mei_cl_conn_status_to_errno(rs->status);
580 * mei_hbm_fw_disconnect_req - disconnect request initiated by ME firmware
581 * host sends disconnect response
583 * @dev: the device structure.
584 * @disconnect_req: disconnect request bus message from the me
586 * returns -ENOMEM on allocation failure
588 static int mei_hbm_fw_disconnect_req(struct mei_device *dev,
589 struct hbm_client_connect_request *disconnect_req)
592 struct mei_cl_cb *cb;
594 list_for_each_entry(cl, &dev->file_list, link) {
595 if (mei_hbm_cl_addr_equal(cl, disconnect_req)) {
596 dev_dbg(&dev->pdev->dev, "disconnect request host client %d ME client %d.\n",
597 disconnect_req->host_addr,
598 disconnect_req->me_addr);
599 cl->state = MEI_FILE_DISCONNECTED;
602 cb = mei_io_cb_init(cl, NULL);
605 cb->fop_type = MEI_FOP_DISCONNECT_RSP;
606 cl_dbg(dev, cl, "add disconnect response as first\n");
607 list_add(&cb->list, &dev->ctrl_wr_list.list);
617 * mei_hbm_version_is_supported - checks whether the driver can
618 * support the hbm version of the device
620 * @dev: the device structure
621 * returns true if driver can support hbm version of the device
623 bool mei_hbm_version_is_supported(struct mei_device *dev)
625 return (dev->version.major_version < HBM_MAJOR_VERSION) ||
626 (dev->version.major_version == HBM_MAJOR_VERSION &&
627 dev->version.minor_version <= HBM_MINOR_VERSION);
631 * mei_hbm_dispatch - bottom half read routine after ISR to
632 * handle the read bus message cmd processing.
634 * @dev: the device structure
635 * @mei_hdr: header of bus message
637 * returns 0 on success and < 0 on failure
639 int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)
641 struct mei_bus_message *mei_msg;
642 struct hbm_host_version_response *version_res;
643 struct hbm_client_connect_response *connect_res;
644 struct hbm_client_connect_response *disconnect_res;
645 struct hbm_client_connect_request *disconnect_req;
646 struct hbm_flow_control *flow_control;
647 struct hbm_props_response *props_res;
648 struct hbm_host_enum_response *enum_res;
650 /* read the message to our buffer */
651 BUG_ON(hdr->length >= sizeof(dev->rd_msg_buf));
652 mei_read_slots(dev, dev->rd_msg_buf, hdr->length);
653 mei_msg = (struct mei_bus_message *)dev->rd_msg_buf;
655 /* ignore spurious message and prevent reset nesting
656 * hbm is put to idle during system reset
658 if (dev->hbm_state == MEI_HBM_IDLE) {
659 dev_dbg(&dev->pdev->dev, "hbm: state is idle ignore spurious messages\n");
663 switch (mei_msg->hbm_cmd) {
664 case HOST_START_RES_CMD:
665 dev_dbg(&dev->pdev->dev, "hbm: start: response message received.\n");
667 dev->init_clients_timer = 0;
669 version_res = (struct hbm_host_version_response *)mei_msg;
671 dev_dbg(&dev->pdev->dev, "HBM VERSION: DRIVER=%02d:%02d DEVICE=%02d:%02d\n",
672 HBM_MAJOR_VERSION, HBM_MINOR_VERSION,
673 version_res->me_max_version.major_version,
674 version_res->me_max_version.minor_version);
676 if (version_res->host_version_supported) {
677 dev->version.major_version = HBM_MAJOR_VERSION;
678 dev->version.minor_version = HBM_MINOR_VERSION;
680 dev->version.major_version =
681 version_res->me_max_version.major_version;
682 dev->version.minor_version =
683 version_res->me_max_version.minor_version;
686 if (!mei_hbm_version_is_supported(dev)) {
687 dev_warn(&dev->pdev->dev, "hbm: start: version mismatch - stopping the driver.\n");
689 dev->hbm_state = MEI_HBM_STOPPED;
690 if (mei_hbm_stop_req(dev)) {
691 dev_err(&dev->pdev->dev, "hbm: start: failed to send stop request\n");
697 if (dev->dev_state != MEI_DEV_INIT_CLIENTS ||
698 dev->hbm_state != MEI_HBM_START) {
699 dev_err(&dev->pdev->dev, "hbm: start: state mismatch, [%d, %d]\n",
700 dev->dev_state, dev->hbm_state);
704 dev->hbm_state = MEI_HBM_STARTED;
706 if (mei_hbm_enum_clients_req(dev)) {
707 dev_err(&dev->pdev->dev, "hbm: start: failed to send enumeration request\n");
711 wake_up_interruptible(&dev->wait_recvd_msg);
714 case CLIENT_CONNECT_RES_CMD:
715 dev_dbg(&dev->pdev->dev, "hbm: client connect response: message received.\n");
717 connect_res = (struct hbm_client_connect_response *) mei_msg;
718 mei_hbm_cl_connect_res(dev, connect_res);
719 wake_up(&dev->wait_recvd_msg);
722 case CLIENT_DISCONNECT_RES_CMD:
723 dev_dbg(&dev->pdev->dev, "hbm: client disconnect response: message received.\n");
725 disconnect_res = (struct hbm_client_connect_response *) mei_msg;
726 mei_hbm_cl_disconnect_res(dev, disconnect_res);
727 wake_up(&dev->wait_recvd_msg);
730 case MEI_FLOW_CONTROL_CMD:
731 dev_dbg(&dev->pdev->dev, "hbm: client flow control response: message received.\n");
733 flow_control = (struct hbm_flow_control *) mei_msg;
734 mei_hbm_cl_flow_control_res(dev, flow_control);
737 case MEI_PG_ISOLATION_ENTRY_RES_CMD:
738 dev_dbg(&dev->pdev->dev, "power gate isolation entry response received\n");
739 dev->pg_event = MEI_PG_EVENT_RECEIVED;
740 if (waitqueue_active(&dev->wait_pg))
741 wake_up(&dev->wait_pg);
744 case MEI_PG_ISOLATION_EXIT_REQ_CMD:
745 dev_dbg(&dev->pdev->dev, "power gate isolation exit request received\n");
746 dev->pg_event = MEI_PG_EVENT_RECEIVED;
747 if (waitqueue_active(&dev->wait_pg))
748 wake_up(&dev->wait_pg);
751 * If the driver is not waiting on this then
752 * this is HW initiated exit from PG.
753 * Start runtime pm resume sequence to exit from PG.
755 pm_request_resume(&dev->pdev->dev);
758 case HOST_CLIENT_PROPERTIES_RES_CMD:
759 dev_dbg(&dev->pdev->dev, "hbm: properties response: message received.\n");
761 dev->init_clients_timer = 0;
763 if (dev->dev_state != MEI_DEV_INIT_CLIENTS ||
764 dev->hbm_state != MEI_HBM_CLIENT_PROPERTIES) {
765 dev_err(&dev->pdev->dev, "hbm: properties response: state mismatch, [%d, %d]\n",
766 dev->dev_state, dev->hbm_state);
770 props_res = (struct hbm_props_response *)mei_msg;
772 if (props_res->status) {
773 dev_err(&dev->pdev->dev, "hbm: properties response: wrong status = %d\n",
778 mei_hbm_me_cl_add(dev, props_res);
780 dev->me_client_index++;
781 dev->me_client_presentation_num++;
783 /* request property for the next client */
784 if (mei_hbm_prop_req(dev))
789 case HOST_ENUM_RES_CMD:
790 dev_dbg(&dev->pdev->dev, "hbm: enumeration response: message received\n");
792 dev->init_clients_timer = 0;
794 enum_res = (struct hbm_host_enum_response *) mei_msg;
795 BUILD_BUG_ON(sizeof(dev->me_clients_map)
796 < sizeof(enum_res->valid_addresses));
797 memcpy(dev->me_clients_map, enum_res->valid_addresses,
798 sizeof(enum_res->valid_addresses));
800 if (dev->dev_state != MEI_DEV_INIT_CLIENTS ||
801 dev->hbm_state != MEI_HBM_ENUM_CLIENTS) {
802 dev_err(&dev->pdev->dev, "hbm: enumeration response: state mismatch, [%d, %d]\n",
803 dev->dev_state, dev->hbm_state);
807 dev->hbm_state = MEI_HBM_CLIENT_PROPERTIES;
809 /* first property request */
810 if (mei_hbm_prop_req(dev))
815 case HOST_STOP_RES_CMD:
816 dev_dbg(&dev->pdev->dev, "hbm: stop response: message received\n");
818 dev->init_clients_timer = 0;
820 if (dev->hbm_state != MEI_HBM_STOPPED) {
821 dev_err(&dev->pdev->dev, "hbm: stop response: state mismatch, [%d, %d]\n",
822 dev->dev_state, dev->hbm_state);
826 dev->dev_state = MEI_DEV_POWER_DOWN;
827 dev_info(&dev->pdev->dev, "hbm: stop response: resetting.\n");
828 /* force the reset */
832 case CLIENT_DISCONNECT_REQ_CMD:
833 dev_dbg(&dev->pdev->dev, "hbm: disconnect request: message received\n");
835 disconnect_req = (struct hbm_client_connect_request *)mei_msg;
836 mei_hbm_fw_disconnect_req(dev, disconnect_req);
839 case ME_STOP_REQ_CMD:
840 dev_dbg(&dev->pdev->dev, "hbm: stop request: message received\n");
841 dev->hbm_state = MEI_HBM_STOPPED;
842 if (mei_hbm_stop_req(dev)) {
843 dev_err(&dev->pdev->dev, "hbm: start: failed to send stop request\n");