summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm
diff options
context:
space:
mode:
authorNathan Fontenot <nfont@linux.vnet.ibm.com>2017-04-21 22:38:58 +0300
committerDavid S. Miller <davem@davemloft.net>2017-04-24 19:52:13 +0300
commit5d5e84eb7276d30a21257515a83b34d1ef77f99b (patch)
tree391a6afd42f0a2a2a9846bc8bb56e5912dcaac15 /drivers/net/ethernet/ibm
parent2f9de9bac625ae08e9ea132e8dc08cfbe9fb67d2 (diff)
downloadlinux-5d5e84eb7276d30a21257515a83b34d1ef77f99b.tar.xz
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: Nathan Fontenot <nfont@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/ibm')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index cc34bf9be405..199cccbb577a 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -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);
@@ -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)) {