aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2006-10-10 15:50:38 -0400
committerRoland Dreier <rolandd@cisco.com>2006-10-10 15:50:38 -0400
commit73fbe8be73512b8a3ffa3d20c9d7f531af99679c (patch)
tree71ae6cff83523e337d35f5ad294bc315f603c213 /drivers/infiniband
parent1031bfb93adf641436b2192170525b76e2eb25bd (diff)
IPoIB: Check for DMA mapping error for TX packets
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_ib.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index f426a69d9a43..8bf5e9ec7c95 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -355,6 +355,11 @@ void ipoib_send(struct net_device *dev, struct sk_buff *skb,
355 tx_req->skb = skb; 355 tx_req->skb = skb;
356 addr = dma_map_single(priv->ca->dma_device, skb->data, skb->len, 356 addr = dma_map_single(priv->ca->dma_device, skb->data, skb->len,
357 DMA_TO_DEVICE); 357 DMA_TO_DEVICE);
358 if (unlikely(dma_mapping_error(addr))) {
359 ++priv->stats.tx_errors;
360 dev_kfree_skb_any(skb);
361 return;
362 }
358 pci_unmap_addr_set(tx_req, mapping, addr); 363 pci_unmap_addr_set(tx_req, mapping, addr);
359 364
360 if (unlikely(post_send(priv, priv->tx_head & (ipoib_sendq_size - 1), 365 if (unlikely(post_send(priv, priv->tx_head & (ipoib_sendq_size - 1),