2.6.18-rc4: sundance.c compile failure without CONFIG_HOTPLUG

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In compiling 2.6.18-rc4 last night, I ran into a compile failure with
sundance.c, which is the driver my DLink 530TXS card uses.

gcc -m32 -Wp,-MD,drivers/net/.sundance.o.d  -nostdinc
-isystem /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/include -D__KERNEL__
-Iinclude  -include include/linux/autoconf.h -Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-Os -fomit-frame-pointer -pipe -msoft-float
-mpreferred-stack-boundary=2 -fno-unit-at-a-time -march=i686
-mtune=pentium4 -mregparm=3 -ffreestanding
-Iinclude/asm-i386/mach-default -Wdeclaration-after-statement
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(sundance)"
-D"KBUILD_MODNAME=KBUILD_STR(sundance)" -c -o drivers/net/sundance.o
drivers/net/sundance.c drivers/net/sundance.c:226: error: pci_id_tbl
causes a section type conflict
make[2]: *** [drivers/net/sundance.o] Error 1
make[1]: *** [drivers/net] Error 2
make: *** [drivers] Error 2

Compiler is gcc 3.4.6

I generally exclude support for all things I don't use (I maintain my
own old school style "from scratch" system and have no need for hot
plug). I don't think it is intended to have hotplug be a requirement
to compile a PCI NIC driver.

At the time, I didn't realize it had to do with CONFIG_HOTPLUG so I
did this to get it to compile. (works for me, with my card, though
I'm sure it's not correct to do this)

--- linux-2.6.18-rc4-orig/drivers/net/sundance.c
+++ linux-2.6.18-rc4/drivers/net/sundance.c
@@ -223,7 +223,7 @@
 struct pci_id_info {
         const char *name;
 };
-static const struct pci_id_info pci_id_tbl[] __devinitdata = {
+static const struct pci_id_info pci_id_tbl[] = {
 	{"D-Link DFE-550TX FAST Ethernet Adapter"},
 	{"D-Link DFE-550FX 100Mbps Fiber-optics Adapter"},
 	{"D-Link DFE-580TX 4 port Server Adapter"},
@@ -231,7 +231,7 @@
 	{"D-Link DL10050-based FAST Ethernet Adapter"},
 	{"Sundance Technology Alta"},
 	{"IC Plus Corporation IP100A FAST Ethernet Adapter"},
-	{ }	/* terminate list. */
+	{NULL,},	/* terminate list. */
 };

 /* This driver was written to use PCI memory space, however
x86-oriented

Anyhow, after further testing, with support for hot pluggable devices
enabled, the sundance driver compiles without messing with the above.

In case anyone wants to look at it, the .config for the failed build
is here:

http://www.mikeserv.com/temp/config-2.6.18-rc4

Mike Houston
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux