ipoib: fix the function that performs dma unmap of memory buffers
PATCH 1/1 ipoib: fix the function that performs dma unmap of memory buffers
Pages that were mapped using ib_dma_map_page() should be unmapped using the right function (i.e. ib_dma_unmap_page()).
Signed-off-by Dotan Barak <[email protected]>
Reviewed-by Jack Morgenstein <[email protected]>
---
drivers/infiniband/ulp/ipoib/ipoib_cm.c +2 -2
@@ -84,7 +84,7 @@ static void ipoib_cm_dma_unmap_rx(struct ipoib_dev_priv *priv, int frags,ib_dma_unmap_single (priv->ca, mapping[0 ],IPOIB_CM_HEAD_SIZE ,DMA_FROM_DEVICE );for (i =0 ; i < frags; ++i) -ib_dma_unmap_single (priv->ca, mapping[i +1 ],PAGE_SIZE ,DMA_FROM_DEVICE ); +ib_dma_unmap_page (priv->ca, mapping[i +1 ],PAGE_SIZE ,DMA_FROM_DEVICE ); }static int ipoib_cm_post_receive_srq (struct net_device *dev,int id)
@@ -183,7 +183,7 @@ partial_error:ib_dma_unmap_single (priv->ca, mapping[0 ],IPOIB_CM_HEAD_SIZE ,DMA_FROM_DEVICE );for (; i >0 ; --i) -ib_dma_unmap_single (priv->ca, mapping[i],PAGE_SIZE ,DMA_FROM_DEVICE ); +ib_dma_unmap_page (priv->ca, mapping[i],PAGE_SIZE ,DMA_FROM_DEVICE );dev_kfree_skb_any (skb);return NULL ;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html