Re: [git patches] new network drivers for net-next

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: David Miller <davem@...>
Cc: <jeff@...>, <netdev@...>, <linux-kernel@...>
Date: Friday, September 19, 2008 - 10:28 pm

On Friday 19 September 2008 19:53:42 David Miller wrote:

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:

--- 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


-- 
[]'s
Herton
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git patches] new network drivers for net-next, Jeff Garzik, (Thu Sep 18, 12:00 pm)
Re: [git patches] new network drivers for net-next, David Miller, (Fri Sep 19, 6:53 pm)
Re: [git patches] new network drivers for net-next, Herton Ronaldo Krzesinski..., (Fri Sep 19, 10:28 pm)
Re: [git patches] new network drivers for net-next, David Miller, (Thu Sep 18, 7:42 pm)
Re: [git patches] new network drivers for net-next, Jeff Garzik, (Thu Sep 18, 7:44 pm)
Re: [git patches] new network drivers for net-next, David Miller, (Thu Sep 18, 7:48 pm)