aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@dev.mellanox.co.il>2007-04-10 11:32:42 -0400
committerRoland Dreier <rolandd@cisco.com>2007-04-10 11:58:30 -0400
commit6371ea3d48e17d4638a91a4a1e0364e56204e418 (patch)
tree8ef123fa72e84c1f9a1fbd6365af02802a61560d /drivers
parent1d426d6418d1914b592c9c307c02e488d9182fa8 (diff)
IPoIB/cm: Fix DMA direction typo
Receive buffers need to be mapped with DMA_FROM_DEVICE. Incorrectly mapping with DMA_TO_DEVICE causes a hard lock on ppc64 machines with an IOMMU. This fixes <https://bugs.openfabrics.org/show_bug.cgi?id=431> Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_cm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
index e70492db74f6..2b242a4823f8 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -131,7 +131,7 @@ static struct sk_buff *ipoib_cm_alloc_rx_skb(struct net_device *dev, int id, int
131 skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE); 131 skb_fill_page_desc(skb, i, page, 0, PAGE_SIZE);
132 132
133 mapping[i + 1] = ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[i].page, 133 mapping[i + 1] = ib_dma_map_page(priv->ca, skb_shinfo(skb)->frags[i].page,
134 0, PAGE_SIZE, DMA_TO_DEVICE); 134 0, PAGE_SIZE, DMA_FROM_DEVICE);
135 if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1]))) 135 if (unlikely(ib_dma_mapping_error(priv->ca, mapping[i + 1])))
136 goto partial_error; 136 goto partial_error;
137 } 137 }