Skip to contentSkip to conversation

2.6.24-git6 build failure on sis190 ethernet driver

BUILD FAILURE Kamalesh Babulal 3 participants 5 messages Jan 30, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi,

The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure

drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict make[2]: *** [drivers/net/sis190.o] Error 1

# gcc --version (machine1)
gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
# gcc --version (machine2)
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)
Signature · 4 lines
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.
#1 lore raw
Quoted 4 lines · Kamalesh Babulal

Hi,

The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure

Quoted 9 lines

drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict make[2]: *** [drivers/net/sis190.o] Error 1

# gcc --version (machine1)
gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
# gcc --version (machine2)
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)

Heh :) vger.kernel.org does not like emails directly from gmail , it seems =)

( sorry for sending this 3 time now )

The following patch should fix the build failure.

drivers/net/sis190.c +1 -1
index b570402..e48e4ad 100644
@@ -326,7 +326,7 @@ static const struct {
 	{ "SiS 191 PCI Gigabit Ethernet adapter" },
 };
 
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static const struct pci_device_id sis190_pci_tbl[] __devinitdata = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
 	{ 0, },

Gabriel

#2 lore raw
Quoted 36 lines · Gabriel C
Quoted 4 lines · Kamalesh Babulal

Hi,

The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure

Quoted 9 lines

drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict make[2]: *** [drivers/net/sis190.o] Error 1

# gcc --version (machine1)
gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
# gcc --version (machine2)
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)

Heh :) vger.kernel.org does not like emails directly from gmail , it seems =)

( sorry for sending this 3 time now )

The following patch should fix the build failure.

drivers/net/sis190.c +1 -1
index b570402..e48e4ad 100644
@@ -326,7 +326,7 @@ static const struct {
 	{ "SiS 191 PCI Gigabit Ethernet adapter" },
 };
 
-static struct pci_device_id sis190_pci_tbl[] __devinitdata = {
+static const struct pci_device_id sis190_pci_tbl[] __devinitdata = {
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0190), 0, 0, 0 },
 	{ PCI_DEVICE(PCI_VENDOR_ID_SI, 0x0191), 0, 0, 1 },
 	{ 0, },
Quoted 1 line

Gabriel

Hi Gabriel,

Thanks, the patch fixes the build failure.

Signature · 4 lines
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.
#3 lore raw
In reply to Kamalesh Babulal
Quoted 4 lines · Kamalesh Babulal

Hi,

The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure

Quoted 8 lines

drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict make[2]: *** [drivers/net/sis190.o] Error 1

# gcc --version (machine1)
gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
# gcc --version (machine2)
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)

Hi Kamalesh

I know another patch is circulating, but please try the following.

drivers/net/sis190.c +1 -1
index b570402..0a5e024 100644
@@ -1556,7 +1556,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
 static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
 						   struct net_device *dev)
 {
-	static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
+	static const u16 __devinitconst ids[] = { 0x0965, 0x0966, 0x0968 };
 	struct sis190_private *tp = netdev_priv(dev);
 	struct pci_dev *isa_bridge;
 	u8 reg, tmp8;

It is the better fix if you can confirm it working. The section conflict issued by gcc happens because we try to mix const and non-const data in the same section.

Sam

author Tested-by
#4 lore raw
Quoted 11 lines · Sam Ravnborg
Quoted 10 lines · Kamalesh Babulal

Hi,

The 2.6.24-git6 kernel build fails on various x86_64 machines with the build failure

drivers/net/sis190.c:329: error: sis190_pci_tbl causes a section type conflict make[2]: *** [drivers/net/sis190.o] Error 1

# gcc --version (machine1)
gcc (GCC) 4.1.1 20070105 (Red Hat 4.1.1-52)
Quoted 6 lines
Quoted 2 lines
# gcc --version (machine2)
gcc (GCC) 4.1.1 20060525 (Red Hat 4.1.1-1)

Hi Kamalesh

I know another patch is circulating, but please try the following.

Hi Sam,

Thanks, the patch fixes the build failure.

Quoted 19 lines
drivers/net/sis190.c +1 -1
index b570402..0a5e024 100644
@@ -1556,7 +1556,7 @@ static int __devinit sis190_get_mac_addr_from_eeprom(struct pci_dev *pdev,
 static int __devinit sis190_get_mac_addr_from_apc(struct pci_dev *pdev,
 						   struct net_device *dev)
 {
-	static const u16 __devinitdata ids[] = { 0x0965, 0x0966, 0x0968 };
+	static const u16 __devinitconst ids[] = { 0x0965, 0x0966, 0x0968 };
 	struct sis190_private *tp = netdev_priv(dev);
 	struct pci_dev *isa_bridge;
 	u8 reg, tmp8;

It is the better fix if you can confirm it working. The section conflict issued by gcc happens because we try to mix const and non-const data in the same section.

Sam

Signature · 4 lines
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.