OSDN Git Service
(root)
/
uclinux-h8
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1031bfb
)
IPoIB: Check for DMA mapping error for TX packets
author
Roland Dreier
<rolandd@cisco.com>
Tue, 10 Oct 2006 19:50:38 +0000
(12:50 -0700)
committer
Roland Dreier
<rolandd@cisco.com>
Tue, 10 Oct 2006 19:50:38 +0000
(12:50 -0700)
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/ulp/ipoib/ipoib_ib.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index
f426a69
..
8bf5e9e
100644
(file)
--- 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,
tx_req->skb = skb;
addr = dma_map_single(priv->ca->dma_device, skb->data, skb->len,
DMA_TO_DEVICE);
+ if (unlikely(dma_mapping_error(addr))) {
+ ++priv->stats.tx_errors;
+ dev_kfree_skb_any(skb);
+ return;
+ }
pci_unmap_addr_set(tx_req, mapping, addr);
if (unlikely(post_send(priv, priv->tx_head & (ipoib_sendq_size - 1),