[ofa-general] [PATCH] ipoib - high dma support
Eli Cohen
eli at mellanox.co.il
Sun Aug 12 04:42:51 PDT 2007
Add high dma support to ipoib
Signed-off-by: Eli Cohen <eli at mellnaox.co.il>
---
Index: linux-2.6.23-rc1/drivers/infiniband/ulp/ipoib/ipoib_main.c
===================================================================
--- linux-2.6.23-rc1.orig/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-07-10 21:56:30.000000000 +0300
+++ linux-2.6.23-rc1/drivers/infiniband/ulp/ipoib/ipoib_main.c 2007-08-02 14:08:29.000000000 +0300
@@ -46,6 +46,7 @@
#include <linux/ip.h>
#include <linux/in.h>
+#include <linux/pci.h>
#include <net/dst.h>
@@ -1072,6 +1073,7 @@ static struct net_device *ipoib_add_port
{
struct ipoib_dev_priv *priv;
int result = -ENOMEM;
+ struct pci_dev *pdev;
priv = ipoib_intf_alloc(format);
if (!priv)
@@ -1079,6 +1081,10 @@ static struct net_device *ipoib_add_port
SET_NETDEV_DEV(priv->dev, hca->dma_device);
+ pdev = to_pci_dev(hca->dma_device);
+ if (pdev->dma_mask & DMA_64BIT_MASK)
+ priv->dev->features |= NETIF_F_HIGHDMA;
+
result = ib_query_pkey(hca, port, 0, &priv->pkey);
if (result) {
printk(KERN_WARNING "%s: ib_query_pkey port %d failed (ret = %d)\n",
More information about the general
mailing list