lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20060826150928.2e291f94.mikeserv@bmts.com>
Date:	Sat, 26 Aug 2006 15:09:28 -0400
From:	Mike Houston <mikeserv@...s.com>
To:	linux-kernel@...r.kernel.org
Subject: 2.6.18-rc4: sundance.c compile failure without CONFIG_HOTPLUG

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 majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ