summaryrefslogtreecommitdiffstats
path: root/sys/ofed
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2011-03-21 21:16:40 +0000
committerkib <kib@FreeBSD.org>2011-03-21 21:16:40 +0000
commit3591d152b2cc88ff15075e1eba664d04f99fbcd2 (patch)
treee047fe781b5f4a4efc560d9b45751246fc766160 /sys/ofed
parent9fa2bf8aee52318f7642bf3d3904f66fbce1ec79 (diff)
downloadFreeBSD-src-3591d152b2cc88ff15075e1eba664d04f99fbcd2.zip
FreeBSD-src-3591d152b2cc88ff15075e1eba664d04f99fbcd2.tar.gz
Allow the ofed modules to be compiled on i386.
Reviewed by: jeff
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c4
-rw-r--r--sys/ofed/include/linux/gfp.h3
-rw-r--r--sys/ofed/include/linux/scatterlist.h2
-rw-r--r--sys/ofed/include/rdma/ib_addr.h2
4 files changed, 7 insertions, 4 deletions
diff --git a/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c b/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
index 772cf8c..5401364 100644
--- a/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c
@@ -1228,8 +1228,8 @@ static int __devinit mthca_init_one(struct pci_dev *pdev,
}
if (id->driver_data >= ARRAY_SIZE(mthca_hca_table)) {
- printk(KERN_ERR PFX "%s has invalid driver data %lx\n",
- pci_name(pdev), id->driver_data);
+ printk(KERN_ERR PFX "%s has invalid driver data %jx\n",
+ pci_name(pdev), (uintmax_t)id->driver_data);
mutex_unlock(&mthca_device_mutex);
return -ENODEV;
}
diff --git a/sys/ofed/include/linux/gfp.h b/sys/ofed/include/linux/gfp.h
index 7f8a24f..661ff41 100644
--- a/sys/ofed/include/linux/gfp.h
+++ b/sys/ofed/include/linux/gfp.h
@@ -56,7 +56,8 @@ page_address(struct page *page)
if (page->object != kmem_object && page->object != kernel_object)
return (NULL);
- return (void *)(VM_MIN_KERNEL_ADDRESS + IDX_TO_OFF(page->pindex));
+ return ((void *)(uintptr_t)(VM_MIN_KERNEL_ADDRESS +
+ IDX_TO_OFF(page->pindex)));
}
static inline unsigned long
diff --git a/sys/ofed/include/linux/scatterlist.h b/sys/ofed/include/linux/scatterlist.h
index 611ad56..49dc31d 100644
--- a/sys/ofed/include/linux/scatterlist.h
+++ b/sys/ofed/include/linux/scatterlist.h
@@ -36,7 +36,7 @@ struct scatterlist {
struct page *page;
struct scatterlist *sg;
} sl_un;
- unsigned long address;
+ dma_addr_t address;
unsigned long offset;
uint32_t length;
uint32_t flags;
diff --git a/sys/ofed/include/rdma/ib_addr.h b/sys/ofed/include/rdma/ib_addr.h
index 61b0a7c..0783abe 100644
--- a/sys/ofed/include/rdma/ib_addr.h
+++ b/sys/ofed/include/rdma/ib_addr.h
@@ -247,6 +247,7 @@ static inline int iboe_get_rate(struct net_device *dev)
#else
static inline int iboe_get_rate(struct net_device *dev)
{
+#ifdef __amd64__
if (dev->if_baudrate >= IF_Gbps(40ULL))
return IB_RATE_40_GBPS;
else if (dev->if_baudrate >= IF_Gbps(30ULL))
@@ -256,6 +257,7 @@ static inline int iboe_get_rate(struct net_device *dev)
else if (dev->if_baudrate >= IF_Gbps(10ULL))
return IB_RATE_10_GBPS;
else
+#endif
return IB_RATE_PORT_CURRENT;
}
#endif
OpenPOWER on IntegriCloud