Skip to content

Commit

Permalink
ibmvnic: Move initialization of the stats token to ibmvnic_open
Browse files Browse the repository at this point in the history
We should be initializing the stats token in the same place we
initialize the other resources for the driver.

Signed-off-by: Nathan Fontenot <nfont@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Nathan Fontenot authored and David S. Miller committed Apr 24, 2017
1 parent 2f9de9b commit 5d5e84e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions drivers/net/ethernet/ibm/ibmvnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,10 @@ static int ibmvnic_open(struct net_device *netdev)
return -1;
}

rc = init_stats_token(adapter);
if (rc)
return rc;

adapter->map_id = 1;
adapter->napi = kcalloc(adapter->req_rx_queues,
sizeof(struct napi_struct), GFP_KERNEL);
Expand Down Expand Up @@ -3241,12 +3245,6 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter)
return rc;
}

rc = init_stats_token(adapter);
if (rc) {
release_crq_queue(adapter);
return rc;
}

init_completion(&adapter->init_done);
ibmvnic_send_crq_init(adapter);
if (!wait_for_completion_timeout(&adapter->init_done, timeout)) {
Expand Down

0 comments on commit 5d5e84e

Please sign in to comment.