diff options
Diffstat (limited to 'drivers/staging/mei/init.c')
-rw-r--r-- | drivers/staging/mei/init.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/staging/mei/init.c b/drivers/staging/mei/init.c index 0fa8216fd0eb..8bf34794489c 100644 --- a/drivers/staging/mei/init.c +++ b/drivers/staging/mei/init.c @@ -133,6 +133,7 @@ struct mei_device *mei_device_init(struct pci_dev *pdev) init_waitqueue_head(&dev->wait_stop_wd); dev->mei_state = MEI_INITIALIZING; dev->iamthif_state = MEI_IAMTHIF_IDLE; + dev->wd_interface_reg = false; mei_io_list_init(&dev->read_list); @@ -469,9 +470,12 @@ void mei_allocate_me_clients_storage(struct mei_device *dev) * * @dev: the device structure * - * returns none. + * returns: + * < 0 - Error. + * = 0 - no more clients. + * = 1 - still have clients to send properties request. */ -void mei_host_client_properties(struct mei_device *dev) +int mei_host_client_properties(struct mei_device *dev) { struct mei_msg_hdr *mei_header; struct hbm_props_request *host_cli_req; @@ -503,26 +507,15 @@ void mei_host_client_properties(struct mei_device *dev) dev->mei_state = MEI_RESETING; dev_dbg(&dev->pdev->dev, "write send enumeration request message to FW fail.\n"); mei_reset(dev, 1); - return; + return -EIO; } dev->init_clients_timer = INIT_CLIENTS_TIMEOUT; dev->me_client_index = b; - return; + return 1; } - - /* - * Clear Map for indicating now ME clients - * with associated host client - */ - bitmap_zero(dev->host_clients_map, MEI_CLIENTS_MAX); - dev->open_handle_count = 0; - bitmap_set(dev->host_clients_map, 0, 3); - dev->mei_state = MEI_ENABLED; - - mei_wd_host_init(dev); - return; + return 0; } /** |