diff options
author | Nathan Fontenot <nfont@linux.vnet.ibm.com> | 2017-05-03 14:05:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-05-03 11:33:05 -0400 |
commit | 161b8a813877fb7d3deba6b3bd2731d4f4a75c5e (patch) | |
tree | c060f50efb85c60e164ca8bfb64a1b3dff8cfd4a /drivers/net/ethernet/ibm | |
parent | 46293b940fede04f90aab18d4bfecc5bd942cf3a (diff) | |
download | linux-161b8a813877fb7d3deba6b3bd2731d4f4a75c5e.tar.gz linux-161b8a813877fb7d3deba6b3bd2731d4f4a75c5e.tar.bz2 linux-161b8a813877fb7d3deba6b3bd2731d4f4a75c5e.zip |
ibmvnic: Check for driver reset first in ibmvnic_xmit
Move the check for the driver resetting to the first thing
in ibmvnic_xmit().
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.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c index a312bc1fee6d..f1ee37716ad7 100644 --- a/drivers/net/ethernet/ibm/ibmvnic.c +++ b/drivers/net/ethernet/ibm/ibmvnic.c @@ -985,12 +985,6 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev) int index = 0; int ret = 0; - tx_pool = &adapter->tx_pool[queue_num]; - tx_scrq = adapter->tx_scrq[queue_num]; - txq = netdev_get_tx_queue(netdev, skb_get_queue_mapping(skb)); - handle_array = (u64 *)((u8 *)(adapter->login_rsp_buf) + - be32_to_cpu(adapter->login_rsp_buf-> - off_txsubm_subcrqs)); if (adapter->resetting) { if (!netif_subqueue_stopped(netdev, skb)) netif_stop_subqueue(netdev, queue_num); @@ -1002,6 +996,12 @@ static int ibmvnic_xmit(struct sk_buff *skb, struct net_device *netdev) goto out; } + tx_pool = &adapter->tx_pool[queue_num]; + tx_scrq = adapter->tx_scrq[queue_num]; + txq = netdev_get_tx_queue(netdev, skb_get_queue_mapping(skb)); + handle_array = (u64 *)((u8 *)(adapter->login_rsp_buf) + + be32_to_cpu(adapter->login_rsp_buf->off_txsubm_subcrqs)); + index = tx_pool->free_map[tx_pool->consumer_index]; offset = index * adapter->req_mtu; dst = tx_pool->long_term_buff.buff + offset; |