Commit 5d5e84eb authored by Nathan Fontenot's avatar Nathan Fontenot Committed by David S. Miller

ibmvnic: Move initialization of the stats token to ibmvnic_open

We should be initializing the stats token in the same place we
initialize the other resources for the driver.
Signed-off-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 2f9de9ba
...@@ -607,6 +607,10 @@ static int ibmvnic_open(struct net_device *netdev) ...@@ -607,6 +607,10 @@ static int ibmvnic_open(struct net_device *netdev)
return -1; return -1;
} }
rc = init_stats_token(adapter);
if (rc)
return rc;
adapter->map_id = 1; adapter->map_id = 1;
adapter->napi = kcalloc(adapter->req_rx_queues, adapter->napi = kcalloc(adapter->req_rx_queues,
sizeof(struct napi_struct), GFP_KERNEL); sizeof(struct napi_struct), GFP_KERNEL);
...@@ -3241,12 +3245,6 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter) ...@@ -3241,12 +3245,6 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter)
return rc; return rc;
} }
rc = init_stats_token(adapter);
if (rc) {
release_crq_queue(adapter);
return rc;
}
init_completion(&adapter->init_done); init_completion(&adapter->init_done);
ibmvnic_send_crq_init(adapter); ibmvnic_send_crq_init(adapter);
if (!wait_for_completion_timeout(&adapter->init_done, timeout)) { if (!wait_for_completion_timeout(&adapter->init_done, timeout)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment