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/pci.h>
18 #include <linux/sched.h>
19 #include <linux/wait.h>
20 #include <linux/mei.h>
26 static const char *mei_cl_conn_status_str(enum mei_cl_connect_status status)
28 #define MEI_CL_CS(status) case MEI_CL_CONN_##status: return #status
32 MEI_CL_CS(ALREADY_STARTED);
33 MEI_CL_CS(OUT_OF_RESOURCES);
34 MEI_CL_CS(MESSAGE_SMALL);
35 default: return "unknown";
41 * mei_cl_conn_status_to_errno - convert client connect response
42 * status to error code
44 * @status: client connect response status
46 * returns corresponding error code
48 static int mei_cl_conn_status_to_errno(enum mei_cl_connect_status status)
51 case MEI_CL_CONN_SUCCESS: return 0;
52 case MEI_CL_CONN_NOT_FOUND: return -ENOTTY;
53 case MEI_CL_CONN_ALREADY_STARTED: return -EBUSY;
54 case MEI_CL_CONN_OUT_OF_RESOURCES: return -EBUSY;
55 case MEI_CL_CONN_MESSAGE_SMALL: return -EINVAL;
56 default: return -EINVAL;
61 * mei_hbm_me_cl_allocate - allocates storage for me clients
63 * @dev: the device structure
65 * returns 0 on success -ENOMEM on allocation failure
67 static int mei_hbm_me_cl_allocate(struct mei_device *dev)
69 struct mei_me_client *clients;
72 dev->me_clients_num = 0;
73 dev->me_client_presentation_num = 0;
74 dev->me_client_index = 0;
76 /* count how many ME clients we have */
77 for_each_set_bit(b, dev->me_clients_map, MEI_CLIENTS_MAX)
78 dev->me_clients_num++;
80 if (dev->me_clients_num == 0)
83 kfree(dev->me_clients);
84 dev->me_clients = NULL;
86 dev_dbg(&dev->pdev->dev, "memory allocation for ME clients size=%ld.\n",
87 dev->me_clients_num * sizeof(struct mei_me_client));
88 /* allocate storage for ME clients representation */
89 clients = kcalloc(dev->me_clients_num,
90 sizeof(struct mei_me_client), GFP_KERNEL);
92 dev_err(&dev->pdev->dev, "memory allocation for ME clients failed.\n");
95 dev->me_clients = clients;
100 * mei_hbm_cl_hdr - construct client hbm header
103 * @hbm_cmd: host bus message command
104 * @buf: buffer for cl header
105 * @len: buffer length
108 void mei_hbm_cl_hdr(struct mei_cl *cl, u8 hbm_cmd, void *buf, size_t len)
110 struct mei_hbm_cl_cmd *cmd = buf;
114 cmd->hbm_cmd = hbm_cmd;
115 cmd->host_addr = cl->host_client_id;
116 cmd->me_addr = cl->me_client_id;
120 * mei_hbm_cl_addr_equal - tells if they have the same address
123 * @buf: buffer with cl header
125 * returns true if addresses are the same
128 bool mei_hbm_cl_addr_equal(struct mei_cl *cl, void *buf)
130 struct mei_hbm_cl_cmd *cmd = buf;
131 return cl->host_client_id == cmd->host_addr &&
132 cl->me_client_id == cmd->me_addr;
137 * mei_hbm_idle - set hbm to idle state
139 * @dev: the device structure
141 void mei_hbm_idle(struct mei_device *dev)
143 dev->init_clients_timer = 0;
144 dev->hbm_state = MEI_HBM_IDLE;
147 int mei_hbm_start_wait(struct mei_device *dev)
150 if (dev->hbm_state > MEI_HBM_START)
153 mutex_unlock(&dev->device_lock);
154 ret = wait_event_interruptible_timeout(dev->wait_recvd_msg,
155 dev->hbm_state == MEI_HBM_IDLE ||
156 dev->hbm_state >= MEI_HBM_STARTED,
157 mei_secs_to_jiffies(MEI_HBM_TIMEOUT));
158 mutex_lock(&dev->device_lock);
160 if (ret <= 0 && (dev->hbm_state <= MEI_HBM_START)) {
161 dev->hbm_state = MEI_HBM_IDLE;
162 dev_err(&dev->pdev->dev, "waiting for mei start failed\n");
169 * mei_hbm_start_req - sends start request message.
171 * @dev: the device structure
173 * returns 0 on success and < 0 on failure
175 int mei_hbm_start_req(struct mei_device *dev)
177 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
178 struct hbm_host_version_request *start_req;
179 const size_t len = sizeof(struct hbm_host_version_request);
182 mei_hbm_hdr(mei_hdr, len);
184 /* host start message */
185 start_req = (struct hbm_host_version_request *)dev->wr_msg.data;
186 memset(start_req, 0, len);
187 start_req->hbm_cmd = HOST_START_REQ_CMD;
188 start_req->host_version.major_version = HBM_MAJOR_VERSION;
189 start_req->host_version.minor_version = HBM_MINOR_VERSION;
191 dev->hbm_state = MEI_HBM_IDLE;
192 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data);
194 dev_err(&dev->pdev->dev, "version message write failed: ret = %d\n",
199 dev->hbm_state = MEI_HBM_START;
200 dev->init_clients_timer = MEI_CLIENTS_INIT_TIMEOUT;
205 * mei_hbm_enum_clients_req - sends enumeration client request message.
207 * @dev: the device structure
209 * returns 0 on success and < 0 on failure
211 static int mei_hbm_enum_clients_req(struct mei_device *dev)
213 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
214 struct hbm_host_enum_request *enum_req;
215 const size_t len = sizeof(struct hbm_host_enum_request);
218 /* enumerate clients */
219 mei_hbm_hdr(mei_hdr, len);
221 enum_req = (struct hbm_host_enum_request *)dev->wr_msg.data;
222 memset(enum_req, 0, len);
223 enum_req->hbm_cmd = HOST_ENUM_REQ_CMD;
225 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data);
227 dev_err(&dev->pdev->dev, "enumeration request write failed: ret = %d.\n",
231 dev->hbm_state = MEI_HBM_ENUM_CLIENTS;
232 dev->init_clients_timer = MEI_CLIENTS_INIT_TIMEOUT;
237 * mei_hbm_prop_req - request property for a single client
239 * @dev: the device structure
241 * returns 0 on success and < 0 on failure
244 static int mei_hbm_prop_req(struct mei_device *dev)
247 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
248 struct hbm_props_request *prop_req;
249 const size_t len = sizeof(struct hbm_props_request);
250 unsigned long next_client_index;
251 unsigned long client_num;
254 client_num = dev->me_client_presentation_num;
256 next_client_index = find_next_bit(dev->me_clients_map, MEI_CLIENTS_MAX,
257 dev->me_client_index);
259 /* We got all client properties */
260 if (next_client_index == MEI_CLIENTS_MAX) {
261 dev->hbm_state = MEI_HBM_STARTED;
262 schedule_work(&dev->init_work);
267 dev->me_clients[client_num].client_id = next_client_index;
268 dev->me_clients[client_num].mei_flow_ctrl_creds = 0;
270 mei_hbm_hdr(mei_hdr, len);
271 prop_req = (struct hbm_props_request *)dev->wr_msg.data;
273 memset(prop_req, 0, sizeof(struct hbm_props_request));
276 prop_req->hbm_cmd = HOST_CLIENT_PROPERTIES_REQ_CMD;
277 prop_req->address = next_client_index;
279 ret = mei_write_message(dev, mei_hdr, dev->wr_msg.data);
281 dev_err(&dev->pdev->dev, "properties request write failed: ret = %d\n",
286 dev->init_clients_timer = MEI_CLIENTS_INIT_TIMEOUT;
287 dev->me_client_index = next_client_index;
293 * mei_hbm_stop_req - send stop request message
298 * This function returns -EIO on write failure
300 static int mei_hbm_stop_req(struct mei_device *dev)
302 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
303 struct hbm_host_stop_request *req =
304 (struct hbm_host_stop_request *)dev->wr_msg.data;
305 const size_t len = sizeof(struct hbm_host_stop_request);
307 mei_hbm_hdr(mei_hdr, len);
310 req->hbm_cmd = HOST_STOP_REQ_CMD;
311 req->reason = DRIVER_STOP_REQUEST;
313 return mei_write_message(dev, mei_hdr, dev->wr_msg.data);
317 * mei_hbm_cl_flow_control_req - sends flow control request.
319 * @dev: the device structure
322 * This function returns -EIO on write failure
324 int mei_hbm_cl_flow_control_req(struct mei_device *dev, struct mei_cl *cl)
326 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
327 const size_t len = sizeof(struct hbm_flow_control);
329 mei_hbm_hdr(mei_hdr, len);
330 mei_hbm_cl_hdr(cl, MEI_FLOW_CONTROL_CMD, dev->wr_msg.data, len);
332 dev_dbg(&dev->pdev->dev, "sending flow control host client = %d, ME client = %d\n",
333 cl->host_client_id, cl->me_client_id);
335 return mei_write_message(dev, mei_hdr, dev->wr_msg.data);
339 * mei_hbm_add_single_flow_creds - adds single buffer credentials.
341 * @dev: the device structure
342 * @flow: flow control.
344 * return 0 on success, < 0 otherwise
346 static int mei_hbm_add_single_flow_creds(struct mei_device *dev,
347 struct hbm_flow_control *flow)
349 struct mei_me_client *me_cl;
352 id = mei_me_cl_by_id(dev, flow->me_addr);
354 dev_err(&dev->pdev->dev, "no such me client %d\n",
359 me_cl = &dev->me_clients[id];
360 if (me_cl->props.single_recv_buf) {
361 me_cl->mei_flow_ctrl_creds++;
362 dev_dbg(&dev->pdev->dev, "recv flow ctrl msg ME %d (single).\n",
364 dev_dbg(&dev->pdev->dev, "flow control credentials =%d.\n",
365 me_cl->mei_flow_ctrl_creds);
367 BUG(); /* error in flow control */
374 * mei_hbm_cl_flow_control_res - flow control response from me
376 * @dev: the device structure
377 * @flow_control: flow control response bus message
379 static void mei_hbm_cl_flow_control_res(struct mei_device *dev,
380 struct hbm_flow_control *flow_control)
384 if (!flow_control->host_addr) {
385 /* single receive buffer */
386 mei_hbm_add_single_flow_creds(dev, flow_control);
390 /* normal connection */
391 list_for_each_entry(cl, &dev->file_list, link) {
392 if (mei_hbm_cl_addr_equal(cl, flow_control)) {
393 cl->mei_flow_ctrl_creds++;
394 dev_dbg(&dev->pdev->dev, "flow ctrl msg for host %d ME %d.\n",
395 flow_control->host_addr, flow_control->me_addr);
396 dev_dbg(&dev->pdev->dev, "flow control credentials = %d.\n",
397 cl->mei_flow_ctrl_creds);
405 * mei_hbm_cl_disconnect_req - sends disconnect message to fw.
407 * @dev: the device structure
408 * @cl: a client to disconnect from
410 * This function returns -EIO on write failure
412 int mei_hbm_cl_disconnect_req(struct mei_device *dev, struct mei_cl *cl)
414 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
415 const size_t len = sizeof(struct hbm_client_connect_request);
417 mei_hbm_hdr(mei_hdr, len);
418 mei_hbm_cl_hdr(cl, CLIENT_DISCONNECT_REQ_CMD, dev->wr_msg.data, len);
420 return mei_write_message(dev, mei_hdr, dev->wr_msg.data);
424 * mei_hbm_cl_disconnect_rsp - sends disconnect respose to the FW
426 * @dev: the device structure
427 * @cl: a client to disconnect from
429 * This function returns -EIO on write failure
431 int mei_hbm_cl_disconnect_rsp(struct mei_device *dev, struct mei_cl *cl)
433 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
434 const size_t len = sizeof(struct hbm_client_connect_response);
436 mei_hbm_hdr(mei_hdr, len);
437 mei_hbm_cl_hdr(cl, CLIENT_DISCONNECT_RES_CMD, dev->wr_msg.data, len);
439 return mei_write_message(dev, mei_hdr, dev->wr_msg.data);
443 * mei_hbm_cl_disconnect_res - disconnect response from ME
445 * @dev: the device structure
446 * @rs: disconnect response bus message
448 static void mei_hbm_cl_disconnect_res(struct mei_device *dev,
449 struct hbm_client_connect_response *rs)
452 struct mei_cl_cb *cb, *next;
454 dev_dbg(&dev->pdev->dev, "hbm: disconnect response cl:host=%02d me=%02d status=%d\n",
455 rs->me_addr, rs->host_addr, rs->status);
457 list_for_each_entry_safe(cb, next, &dev->ctrl_rd_list.list, list) {
460 /* this should not happen */
466 if (mei_hbm_cl_addr_equal(cl, rs)) {
468 if (rs->status == MEI_CL_DISCONN_SUCCESS)
469 cl->state = MEI_FILE_DISCONNECTED;
479 * mei_hbm_cl_connect_req - send connection request to specific me client
481 * @dev: the device structure
482 * @cl: a client to connect to
484 * returns -EIO on write failure
486 int mei_hbm_cl_connect_req(struct mei_device *dev, struct mei_cl *cl)
488 struct mei_msg_hdr *mei_hdr = &dev->wr_msg.hdr;
489 const size_t len = sizeof(struct hbm_client_connect_request);
491 mei_hbm_hdr(mei_hdr, len);
492 mei_hbm_cl_hdr(cl, CLIENT_CONNECT_REQ_CMD, dev->wr_msg.data, len);
494 return mei_write_message(dev, mei_hdr, dev->wr_msg.data);
498 * mei_hbm_cl_connect_res - connect response from the ME
500 * @dev: the device structure
501 * @rs: connect response bus message
503 static void mei_hbm_cl_connect_res(struct mei_device *dev,
504 struct hbm_client_connect_response *rs)
508 struct mei_cl_cb *cb, *next;
510 dev_dbg(&dev->pdev->dev, "hbm: connect response cl:host=%02d me=%02d status=%s\n",
511 rs->me_addr, rs->host_addr,
512 mei_cl_conn_status_str(rs->status));
516 list_for_each_entry_safe(cb, next, &dev->ctrl_rd_list.list, list) {
519 /* this should not happen */
521 list_del_init(&cb->list);
525 if (cb->fop_type != MEI_FOP_CONNECT)
528 if (mei_hbm_cl_addr_equal(cl, rs)) {
538 if (rs->status == MEI_CL_CONN_SUCCESS)
539 cl->state = MEI_FILE_CONNECTED;
541 cl->state = MEI_FILE_DISCONNECTED;
542 cl->status = mei_cl_conn_status_to_errno(rs->status);
547 * mei_hbm_fw_disconnect_req - disconnect request initiated by ME firmware
548 * host sends disconnect response
550 * @dev: the device structure.
551 * @disconnect_req: disconnect request bus message from the me
553 * returns -ENOMEM on allocation failure
555 static int mei_hbm_fw_disconnect_req(struct mei_device *dev,
556 struct hbm_client_connect_request *disconnect_req)
559 struct mei_cl_cb *cb;
561 list_for_each_entry(cl, &dev->file_list, link) {
562 if (mei_hbm_cl_addr_equal(cl, disconnect_req)) {
563 dev_dbg(&dev->pdev->dev, "disconnect request host client %d ME client %d.\n",
564 disconnect_req->host_addr,
565 disconnect_req->me_addr);
566 cl->state = MEI_FILE_DISCONNECTED;
569 cb = mei_io_cb_init(cl, NULL);
572 cb->fop_type = MEI_FOP_DISCONNECT_RSP;
573 cl_dbg(dev, cl, "add disconnect response as first\n");
574 list_add(&cb->list, &dev->ctrl_wr_list.list);
584 * mei_hbm_version_is_supported - checks whether the driver can
585 * support the hbm version of the device
587 * @dev: the device structure
588 * returns true if driver can support hbm version of the device
590 bool mei_hbm_version_is_supported(struct mei_device *dev)
592 return (dev->version.major_version < HBM_MAJOR_VERSION) ||
593 (dev->version.major_version == HBM_MAJOR_VERSION &&
594 dev->version.minor_version <= HBM_MINOR_VERSION);
598 * mei_hbm_dispatch - bottom half read routine after ISR to
599 * handle the read bus message cmd processing.
601 * @dev: the device structure
602 * @mei_hdr: header of bus message
604 * returns 0 on success and < 0 on failure
606 int mei_hbm_dispatch(struct mei_device *dev, struct mei_msg_hdr *hdr)
608 struct mei_bus_message *mei_msg;
609 struct mei_me_client *me_client;
610 struct hbm_host_version_response *version_res;
611 struct hbm_client_connect_response *connect_res;
612 struct hbm_client_connect_response *disconnect_res;
613 struct hbm_client_connect_request *disconnect_req;
614 struct hbm_flow_control *flow_control;
615 struct hbm_props_response *props_res;
616 struct hbm_host_enum_response *enum_res;
618 /* read the message to our buffer */
619 BUG_ON(hdr->length >= sizeof(dev->rd_msg_buf));
620 mei_read_slots(dev, dev->rd_msg_buf, hdr->length);
621 mei_msg = (struct mei_bus_message *)dev->rd_msg_buf;
623 /* ignore spurious message and prevent reset nesting
624 * hbm is put to idle during system reset
626 if (dev->hbm_state == MEI_HBM_IDLE) {
627 dev_dbg(&dev->pdev->dev, "hbm: state is idle ignore spurious messages\n");
631 switch (mei_msg->hbm_cmd) {
632 case HOST_START_RES_CMD:
633 dev_dbg(&dev->pdev->dev, "hbm: start: response message received.\n");
635 dev->init_clients_timer = 0;
637 version_res = (struct hbm_host_version_response *)mei_msg;
639 dev_dbg(&dev->pdev->dev, "HBM VERSION: DRIVER=%02d:%02d DEVICE=%02d:%02d\n",
640 HBM_MAJOR_VERSION, HBM_MINOR_VERSION,
641 version_res->me_max_version.major_version,
642 version_res->me_max_version.minor_version);
644 if (version_res->host_version_supported) {
645 dev->version.major_version = HBM_MAJOR_VERSION;
646 dev->version.minor_version = HBM_MINOR_VERSION;
648 dev->version.major_version =
649 version_res->me_max_version.major_version;
650 dev->version.minor_version =
651 version_res->me_max_version.minor_version;
654 if (!mei_hbm_version_is_supported(dev)) {
655 dev_warn(&dev->pdev->dev, "hbm: start: version mismatch - stopping the driver.\n");
657 dev->hbm_state = MEI_HBM_STOPPED;
658 if (mei_hbm_stop_req(dev)) {
659 dev_err(&dev->pdev->dev, "hbm: start: failed to send stop request\n");
665 if (dev->dev_state != MEI_DEV_INIT_CLIENTS ||
666 dev->hbm_state != MEI_HBM_START) {
667 dev_err(&dev->pdev->dev, "hbm: start: state mismatch, [%d, %d]\n",
668 dev->dev_state, dev->hbm_state);
672 dev->hbm_state = MEI_HBM_STARTED;
674 if (mei_hbm_enum_clients_req(dev)) {
675 dev_err(&dev->pdev->dev, "hbm: start: failed to send enumeration request\n");
679 wake_up_interruptible(&dev->wait_recvd_msg);
682 case CLIENT_CONNECT_RES_CMD:
683 dev_dbg(&dev->pdev->dev, "hbm: client connect response: message received.\n");
685 connect_res = (struct hbm_client_connect_response *) mei_msg;
686 mei_hbm_cl_connect_res(dev, connect_res);
687 wake_up(&dev->wait_recvd_msg);
690 case CLIENT_DISCONNECT_RES_CMD:
691 dev_dbg(&dev->pdev->dev, "hbm: client disconnect response: message received.\n");
693 disconnect_res = (struct hbm_client_connect_response *) mei_msg;
694 mei_hbm_cl_disconnect_res(dev, disconnect_res);
695 wake_up(&dev->wait_recvd_msg);
698 case MEI_FLOW_CONTROL_CMD:
699 dev_dbg(&dev->pdev->dev, "hbm: client flow control response: message received.\n");
701 flow_control = (struct hbm_flow_control *) mei_msg;
702 mei_hbm_cl_flow_control_res(dev, flow_control);
705 case HOST_CLIENT_PROPERTIES_RES_CMD:
706 dev_dbg(&dev->pdev->dev, "hbm: properties response: message received.\n");
708 dev->init_clients_timer = 0;
710 if (dev->me_clients == NULL) {
711 dev_err(&dev->pdev->dev, "hbm: properties response: mei_clients not allocated\n");
715 props_res = (struct hbm_props_response *)mei_msg;
716 me_client = &dev->me_clients[dev->me_client_presentation_num];
718 if (props_res->status) {
719 dev_err(&dev->pdev->dev, "hbm: properties response: wrong status = %d\n",
724 if (me_client->client_id != props_res->address) {
725 dev_err(&dev->pdev->dev, "hbm: properties response: address mismatch %d ?= %d\n",
726 me_client->client_id, props_res->address);
730 if (dev->dev_state != MEI_DEV_INIT_CLIENTS ||
731 dev->hbm_state != MEI_HBM_CLIENT_PROPERTIES) {
732 dev_err(&dev->pdev->dev, "hbm: properties response: state mismatch, [%d, %d]\n",
733 dev->dev_state, dev->hbm_state);
737 me_client->props = props_res->client_properties;
738 dev->me_client_index++;
739 dev->me_client_presentation_num++;
741 /* request property for the next client */
742 if (mei_hbm_prop_req(dev))
747 case HOST_ENUM_RES_CMD:
748 dev_dbg(&dev->pdev->dev, "hbm: enumeration response: message received\n");
750 dev->init_clients_timer = 0;
752 enum_res = (struct hbm_host_enum_response *) mei_msg;
753 BUILD_BUG_ON(sizeof(dev->me_clients_map)
754 < sizeof(enum_res->valid_addresses));
755 memcpy(dev->me_clients_map, enum_res->valid_addresses,
756 sizeof(enum_res->valid_addresses));
758 if (dev->dev_state != MEI_DEV_INIT_CLIENTS ||
759 dev->hbm_state != MEI_HBM_ENUM_CLIENTS) {
760 dev_err(&dev->pdev->dev, "hbm: enumeration response: state mismatch, [%d, %d]\n",
761 dev->dev_state, dev->hbm_state);
765 if (mei_hbm_me_cl_allocate(dev)) {
766 dev_err(&dev->pdev->dev, "hbm: enumeration response: cannot allocate clients array\n");
770 dev->hbm_state = MEI_HBM_CLIENT_PROPERTIES;
772 /* first property request */
773 if (mei_hbm_prop_req(dev))
778 case HOST_STOP_RES_CMD:
779 dev_dbg(&dev->pdev->dev, "hbm: stop response: message received\n");
781 dev->init_clients_timer = 0;
783 if (dev->hbm_state != MEI_HBM_STOPPED) {
784 dev_err(&dev->pdev->dev, "hbm: stop response: state mismatch, [%d, %d]\n",
785 dev->dev_state, dev->hbm_state);
789 dev->dev_state = MEI_DEV_POWER_DOWN;
790 dev_info(&dev->pdev->dev, "hbm: stop response: resetting.\n");
791 /* force the reset */
795 case CLIENT_DISCONNECT_REQ_CMD:
796 dev_dbg(&dev->pdev->dev, "hbm: disconnect request: message received\n");
798 disconnect_req = (struct hbm_client_connect_request *)mei_msg;
799 mei_hbm_fw_disconnect_req(dev, disconnect_req);
802 case ME_STOP_REQ_CMD:
803 dev_dbg(&dev->pdev->dev, "hbm: stop request: message received\n");
804 dev->hbm_state = MEI_HBM_STOPPED;
805 if (mei_hbm_stop_req(dev)) {
806 dev_err(&dev->pdev->dev, "hbm: start: failed to send stop request\n");