Patchwork [git patches] new network drivers for net-next

login
register
mail settings
Submitter Herton Ronaldo Krzesinski
Date Sept. 20, 2008, 2:28 a.m.
Message ID <200809192328.42387.herton@mandriva.com.br>
Download mbox | patch
Permalink /patch/686/
State Accepted
Delegated to: Jeff Garzik
Headers show

Comments

Herton Ronaldo Krzesinski - Sept. 20, 2008, 2:28 a.m.
On Friday 19 September 2008 19:53:42 David Miller wrote:
> From: Jeff Garzik <jeff@garzik.org>
> Date: Thu, 18 Sep 2008 12:00:05 -0400
> 
> > 
> > Please pull from 'new-drivers' branch of
> > master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git new-drivers
> > 
> > to receive the following updates:
> 
> Pulled, thanks Jeff.
> 
> I'll push this to net-next-2.6 after a quick build sanity test.

Hi,

with new enic driver I get the following build error on i386 (config attached):
  CC [M]  drivers/net/enic/vnic_cq.o
drivers/net/enic/vnic_cq.c: In function 'vnic_cq_init':
drivers/net/enic/vnic_cq.c:65: error: implicit declaration of function 'writeq'
make[2]: *** [drivers/net/enic/vnic_cq.o] Error 1
make[1]: *** [drivers/net/enic] Error 2
make: *** [_module_drivers/net] Error 2

Something like patch below (borrowed from net/s2io.h, ok to use it?) fixes it:

Patch

--- linux-2.6.27/drivers/net/enic/vnic_dev.h.orig	2008-09-19 13:57:43.000000000 -0300
+++ linux-2.6.27/drivers/net/enic/vnic_dev.h	2008-09-19 14:00:57.000000000 -0300
@@ -23,6 +23,26 @@ 
 #include "vnic_resource.h"
 #include "vnic_devcmd.h"
 
+#include <linux/io.h>
+#ifndef readq
+static inline u64 readq(void __iomem *addr)
+{
+	u64 ret = 0;
+	ret = readl(addr + 4);
+	ret <<= 32;
+	ret |= readl(addr);
+
+	return ret;
+}
+#endif
+#ifndef writeq
+static inline void writeq(u64 val, void __iomem *addr)
+{
+	writel((u32) (val), addr);
+	writel((u32) (val >> 32), (addr + 4));
+}
+#endif
+
 #ifndef VNIC_PADDR_TARGET
 #define VNIC_PADDR_TARGET	0x0000000000000000ULL
 #endif