summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/ibm/ibmvnic.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2018-02-24 00:04:20 -0500
committerDavid S. Miller <davem@davemloft.net>2018-02-24 00:04:20 -0500
commitf74290fdb363665538743d14c4f00aeacdb68d87 (patch)
treea5c8f6332f06550e935d1e557ac927302f7f63c4 /drivers/net/ethernet/ibm/ibmvnic.c
parent1b71af6053af1bd2f849e9fda4f71c1e3f145dcf (diff)
parent9cb9c07d6b0c5fd97d83b8ab14d7e308ba4b612f (diff)
downloadlinux-f74290fdb363665538743d14c4f00aeacdb68d87.tar.gz
linux-f74290fdb363665538743d14c4f00aeacdb68d87.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/ethernet/ibm/ibmvnic.c')
-rw-r--r--drivers/net/ethernet/ibm/ibmvnic.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index 69d6e01fb767..5a86a916492c 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -1920,6 +1920,11 @@ restart_poll:
dev_kfree_skb_any(rx_buff->skb);
remove_buff_from_pool(adapter, rx_buff);
continue;
+ } else if (!rx_buff->skb) {
+ /* free the entry */
+ next->rx_comp.first = 0;
+ remove_buff_from_pool(adapter, rx_buff);
+ continue;
}
length = be32_to_cpu(next->rx_comp.len);
@@ -3786,7 +3791,6 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
dma_unmap_single(dev, adapter->login_buf_token, adapter->login_buf_sz,
DMA_BIDIRECTIONAL);
- release_login_buffer(adapter);
dma_unmap_single(dev, adapter->login_rsp_buf_token,
adapter->login_rsp_buf_sz, DMA_BIDIRECTIONAL);
@@ -3817,6 +3821,7 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,
ibmvnic_remove(adapter->vdev);
return -EIO;
}
+ release_login_buffer(adapter);
complete(&adapter->init_done);
return 0;