diff mbox

enic: fix compile on x86 and ia64 and fix Kconfig

Message ID Pine.LNX.4.64.0809200202060.13272@palito_client100.nuovasystems.com
State Accepted, archived
Delegated to: Jeff Garzik
Headers show

Commit Message

Scott Feldman Sept. 20, 2008, 9:10 a.m. UTC
enic: fix compile on x86 and ia64 and fix Kconfig

o readq/writeq aren't defined on all archs, so define 'em conditionally here
o for ia64, include net/ip6_checksum.h for csum_ipv6_magic
o fix mangled Kconfig description

Signed-off-by: Scott Feldman <scofeldm@cisco.com>
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox


diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 69c81da..8217138 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -2401,7 +2401,7 @@  config EHEA
  	  will be called ehea.

  config ENIC
-	tristate "E, the Cisco 10G Ethernet NIC"
+	tristate "Cisco 10G Ethernet NIC support"
  	depends on PCI && INET
  	select INET_LRO
diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c
index 4cf5ec7..2592e52 100644
--- a/drivers/net/enic/enic_main.c
+++ b/drivers/net/enic/enic_main.c
@@ -34,6 +34,7 @@ 
  #include <linux/ip.h>
  #include <linux/ipv6.h>
  #include <linux/tcp.h>
+#include <net/ip6_checksum.h>

  #include "cq_enet_desc.h"
  #include "vnic_dev.h"
diff --git a/drivers/net/enic/vnic_dev.c b/drivers/net/enic/vnic_dev.c
index 4d104f5..84d3592 100644
--- a/drivers/net/enic/vnic_dev.c
+++ b/drivers/net/enic/vnic_dev.c
@@ -29,6 +29,20 @@ 
  #include "vnic_dev.h"
  #include "vnic_stats.h"

+#ifndef readq
+static inline u64 readq(void __iomem *reg)
+	return (((u64)readl(reg + 0x4UL) << 32) |
+		(u64)readl(reg));
+static inline void writeq(u64 val, void __iomem *reg)
+	writel(val & 0xffffffff, reg);
+	writel(val >> 32, reg + 0x4UL);
  struct vnic_res {
  	void __iomem *vaddr;
  	unsigned int count;