aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_cm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_cm.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_cm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index 83a7751c38d6..bb1004114dec 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -35,6 +35,7 @@
35#include <net/icmp.h> 35#include <net/icmp.h>
36#include <linux/icmpv6.h> 36#include <linux/icmpv6.h>
37#include <linux/delay.h> 37#include <linux/delay.h>
38#include <linux/slab.h>
38#include <linux/vmalloc.h> 39#include <linux/vmalloc.h>
39 40
40#include "ipoib.h" 41#include "ipoib.h"
@@ -708,6 +709,7 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
708 struct ipoib_dev_priv *priv = netdev_priv(dev); 709 struct ipoib_dev_priv *priv = netdev_priv(dev);
709 struct ipoib_cm_tx_buf *tx_req; 710 struct ipoib_cm_tx_buf *tx_req;
710 u64 addr; 711 u64 addr;
712 int rc;
711 713
712 if (unlikely(skb->len > tx->mtu)) { 714 if (unlikely(skb->len > tx->mtu)) {
713 ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n", 715 ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n",
@@ -739,9 +741,10 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
739 741
740 tx_req->mapping = addr; 742 tx_req->mapping = addr;
741 743
742 if (unlikely(post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1), 744 rc = post_send(priv, tx, tx->tx_head & (ipoib_sendq_size - 1),
743 addr, skb->len))) { 745 addr, skb->len);
744 ipoib_warn(priv, "post_send failed\n"); 746 if (unlikely(rc)) {
747 ipoib_warn(priv, "post_send failed, error %d\n", rc);
745 ++dev->stats.tx_errors; 748 ++dev->stats.tx_errors;
746 ib_dma_unmap_single(priv->ca, addr, skb->len, DMA_TO_DEVICE); 749 ib_dma_unmap_single(priv->ca, addr, skb->len, DMA_TO_DEVICE);
747 dev_kfree_skb_any(skb); 750 dev_kfree_skb_any(skb);
@@ -752,6 +755,8 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_
752 if (++priv->tx_outstanding == ipoib_sendq_size) { 755 if (++priv->tx_outstanding == ipoib_sendq_size) {
753 ipoib_dbg(priv, "TX ring 0x%x full, stopping kernel net queue\n", 756 ipoib_dbg(priv, "TX ring 0x%x full, stopping kernel net queue\n",
754 tx->qp->qp_num); 757 tx->qp->qp_num);
758 if (ib_req_notify_cq(priv->send_cq, IB_CQ_NEXT_COMP))
759 ipoib_warn(priv, "request notify on send CQ failed\n");
755 netif_stop_queue(dev); 760 netif_stop_queue(dev);
756 } 761 }
757 } 762 }