[netdrivers] Re: Starfire not compiling in 2.6.9
Tobias Lorenz
tobias.lorenz at gmx.net
Sun Nov 14 15:29:56 PST 2004
Hi,
Paul Check wrote:
> Hey: I saw your message regarding the starfire driver. I am having
> problems getting it compiled in 2.6.9. When I go to compile my kernel,
> it has a whole slew of warnings like:
>
> drivers/net/starfire.c:1894: warning: passing arg 1 of `readl' makes
> pointer from integer without a cast
>
> I wonder if this is the same thing that was happening to you, and/or if
> you got your problem fixed?
The problem is, that from 2.6.x to 2.6.9 the (read|write)[bwl] macros
have changed to functions in include/asm-i386/io.h. Some other drivers
have problems with that too:
-drivers/scsi/dpt_i2o.c
-drivers/scsi/ipr.c
Some network drivers just redefine them back:
-8139too.c
-dl2k.h
-fealnx.c
-pci-skeleton.c
-sundance.c
-via-rhine.c
by these lines:
#undef readb
#undef readw
#undef readl
#undef writeb
#undef writew
#undef writel
#define readb(addr) inb((unsigned long)(addr))
#define readw(addr) inw((unsigned long)(addr))
#define readl(addr) inl((unsigned long)(addr))
#define writeb(val,addr) outb((val),(unsigned long)(addr))
#define writew(val,addr) outw((val),(unsigned long)(addr))
#define writel(val,addr) outl((val),(unsigned long)(addr))
The following patch includes these lines and fixes again the checksum compile failure.
Bye,
Toby
Signed-off-by: Tobias Lorenz <tobias.lorenz at gmx.net>
--- starfire.c.orig 2004-10-18 23:55:36.000000000 +0200
+++ starfire.c 2004-11-15 00:16:07.000000000 +0100
@@ -365,6 +365,19 @@
#endif /* not HAVE_NETDEV_POLL */
/* end of compatibility code */
+#undef readb
+#undef readw
+#undef readl
+#undef writeb
+#undef writew
+#undef writel
+#define readb(addr) inb((unsigned long)(addr))
+#define readw(addr) inw((unsigned long)(addr))
+#define readl(addr) inl((unsigned long)(addr))
+#define writeb(val,addr) outb((val),(unsigned long)(addr))
+#define writew(val,addr) outw((val),(unsigned long)(addr))
+#define writel(val,addr) outl((val),(unsigned long)(addr))
+
/* These identify the driver base version and may not be removed. */
static char version[] __devinitdata =
@@ -1409,7 +1422,7 @@
}
if (has_bad_length)
- skb_checksum_help(skb);
+ skb_checksum_help(skb, 0);
}
#endif /* ZEROCOPY && HAS_BROKEN_FIRMWARE */
More information about the netdrivers
mailing list