17 #include <linux/pci.h>
18 #include <linux/sched.h>
19 #include <linux/wait.h>
29 #define MEI_DEV_STATE(state) case MEI_DEV_##state: return #state
47 0xa8, 0x46, 0xe0, 0xff, 0x65,
59 INIT_LIST_HEAD(&list->
mei_cb.cb_list);
77 if (mei_cl_cmp_id(cl, cl_tmp))
93 dev_dbg(&cl->
dev->pdev->dev,
"remove list entry belonging to cl\n");
140 INIT_LIST_HEAD(&dev->
wd_cl.link);
177 dev_dbg(&dev->
pdev->dev,
"host_hw_state = 0x%08x, mestate = 0x%08x.\n",
188 dev_dbg(&dev->
pdev->dev,
"reset in start the mei device.\n");
192 dev_dbg(&dev->
pdev->dev,
"host_hw_state = 0x%08x, me_hw_state = 0x%08x.\n",
206 "wait_event_interruptible_timeout failed"
207 "on wait for ME to turn on ME_RDY.\n");
216 "host_hw_state = 0x%08x, me_hw_state = 0x%08x.\n",
220 dev_dbg(&dev->
pdev->dev,
"host turn off H_RDY.\n");
225 dev_err(&dev->
pdev->dev,
"link layer initialization failed.\n");
238 dev_dbg(&dev->
pdev->dev,
"host_hw_state = 0x%08x, me_hw_state = 0x%08x.\n",
240 dev_dbg(&dev->
pdev->dev,
"ME turn on ME_RDY and host turn on H_RDY.\n");
241 dev_dbg(&dev->
pdev->dev,
"link layer has been established.\n");
260 if (interrupts_enabled)
292 dev_dbg(&dev->
pdev->dev,
"before reset host_hw_state = 0x%08x.\n",
295 mei_hw_reset(dev, interrupts_enabled);
302 dev_dbg(&dev->
pdev->dev,
"currently saved host_hw_state = 0x%08x.\n",
320 dev_dbg(&dev->
pdev->dev,
"list del iamthif and wd file list.\n");
322 dev->
wd_cl.host_client_id);
327 mei_reset_iamthif_params(dev);
339 dev_dbg(&dev->
pdev->dev,
"after reset host_hw_state = 0x%08x, me_hw_state = 0x%08x.\n",
343 dev_warn(&dev->
pdev->dev,
"unexpected reset: dev_state = %s\n",
348 if (waitqueue_active(&cl_pos->
rx_wait)) {
392 dev_dbg(&dev->
pdev->dev,
"write send version message to FW fail.\n");
426 dev_dbg(&dev->
pdev->dev,
"write send enumeration request message to FW fail.\n");
459 dev_dbg(&dev->
pdev->dev,
"memory allocation for ME clients size=%zd.\n",
465 dev_dbg(&dev->
pdev->dev,
"memory allocation for ME clients failed.\n");
494 dev->
me_clients[client_num].mei_flow_ctrl_creds = 0;
510 (
unsigned char *)host_cli_req,
513 dev_dbg(&dev->
pdev->dev,
"write send enumeration request message to FW fail.\n");
538 INIT_LIST_HEAD(&priv->
link);
549 if (uuid_le_cmp(*cuuid,
550 dev->
me_clients[i].props.protocol_name) == 0) {
574 if (!dev || !cl || !cuuid)
609 dev_dbg(&dev->
pdev->dev,
"failed to find iamthif client.\n");
626 dev_dbg(&dev->
pdev->dev,
"memory allocation for ME message buffer failed.\n");
633 dev_dbg(&dev->
pdev->dev,
"Failed to connect to AMTHI client\n");
695 dev_dbg(&dev->
pdev->dev,
"failed to call mei_disconnect.\n");
701 dev_dbg(&dev->
pdev->dev,
"add disconnect cb to control write list\n");
714 dev_dbg(&dev->
pdev->dev,
"successfully disconnected from FW client.\n");
718 dev_dbg(&dev->
pdev->dev,
"wrong status client disconnect.\n");
722 "wait failed disconnect err=%08x\n",
725 dev_dbg(&dev->
pdev->dev,
"failed to disconnect from FW client.\n");
749 dev_dbg(&dev->
pdev->dev,
"remove host client = %d, ME client = %d\n",
752 list_del_init(&cl_pos->
link);