Skip to contentSkip to conversation

2.6.6 : bad PCI device ID for SiS ISA bridge => SiS900 eth0: Can not find ISA bridge

DISCUSSION Eric BENARD / Free 4 participants 6 messages May 16, 2004 – May 17, 2004 Network drivers

lore
Share & tools
lore
#0 lore raw

1- bad PCI device ID for SiS ISA bridge

2- In 2.6.3-rc2 (and 2.4.x), the PCI device ID of the ISA bridge of the SiS630e is 0x0008. This ID is used by sis900.c in order to get the MAC adress.
In 2.6.6, the PCI device ID of the ISA bridge of the SiS630E is 0x0018. The SiS900 driver fail to read MAC adress and exit with the following message :
eth0: Can not find ISA bridge

3- SIS630E, ISA bridge, PCI Device ID, SIS900

4- aneto:~# cat /proc/version
Linux version 2.6.6 (ebenard@vignemale) (version gcc 3.3.3 (Debian 20040429)) #2 Sun May 16 19:34:22 CEST 2004

5- No oops

6-
2.6.3-rc2 :

aneto:~# cat /sys/bus/pci/devices/0000\:00\:01.0/device
0x0008
aneto:~# cat /proc/bus/pci/devices
.../...
0008    10390008        0       00000000        00000000        00000000        
00000000        00000000        00000000 00000000        00000000        
00000000        00000000        00000000        00000000        
0000000000000000
0009    10390900        c       0000da01        f3ffd000        00000000        
00000000        00000000        00000000 f3fc0000        00000100        
00001000        00000000        00000000        00000000        
0000000000020000 sis900
.../...
aneto:~# lspci
.../...
0000:00:01.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC 
Bridge)
0000:00:01.1 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI 
Fast Ethernet (rev 81)
.../...

2.6.6 :

aneto:~# cat /sys/bus/pci/devices/0000\:00\:01.0/device
0x0018
aneto:~# cat /proc/bus/pci/devices
.../...
0008    10390018        0       00000000        00000000        00000000        
00000000        00000000        00000000 00000000        00000000        
00000000        00000000        00000000        00000000        
0000000000000000
0009    10390900        c       0000da01        f3ffd000        00000000        
00000000        00000000        00000000 f3fc0000        00000100        
00001000        00000000        00000000        00000000        
0000000000020000 sis900
.../...
aneto:~# lspci
.../...
0000:00:01.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC 
Bridge)
0000:00:01.1 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI 
Fast Ethernet (rev 81)
.../...

7- Linux aneto 2.6.6 #2 Sun May 16 19:34:22 CEST 2004 i686 GNU/Linux

Gnu C                  3.3.3
Gnu make               3.80
binutils               2.14.90.0.7
util-linux             2.12
mount                  2.12
module-init-tools      3.0-pre10
e2fsprogs              1.35
pcmcia-cs              3.2.5
PPP                    2.4.2
Linux C Library        2.3.2
Dynamic linker (ldd)   2.3.2
Procps                 3.2.1
Net-tools              1.60
Console-tools          0.2.3
Sh-utils               5.0.91
Modules Loaded         hostap_crypt_wep hostap_cs ipt_TOS ipt_MASQUER                 

ADE ipt_REJECT ipt_pkttype ipt_LOG ipt_TCPMSS ipt_state ip_nat_irc ip _nat_tftp ip_nat_ftp ip_conntrack_irc ip_conntrack_tftp ip_conntrack_ ftp ipt_multiport ipt_conntrack iptable_filter iptable_mangle iptable _nat ip_conntrack ip_tables lp bridge hostap eagle_usb

8- A quick fix to get sis900.c running (which doesn't explain why the PCI Device ID changed from 2.6.3-rc2 to 2.6.6) :
change line 263 from

	if ((isa_bridge = pci_find_device(0x1039, 0x0008, isa_bridge)) == NULL
to
	if ((isa_bridge = pci_find_device(0x1039, 0x0018, isa_bridge)) == NULL

Eric

#1 lore raw
Quoted 3 lines · Eric BENARD / Free

1- bad PCI device ID for SiS ISA bridge

2- In 2.6.3-rc2 (and 2.4.x), the PCI device ID of the ISA bridge of the SiS630e is 0x0008. This ID is used by sis900.c in order to get the MAC adress. In 2.6.6, the PCI device ID of the ISA bridge of the SiS630E is 0x0018. The SiS900 driver fail to read MAC adress and exit with the following message : eth0: Can not find ISA bridge

[...]

Quoted 5 lines

8- A quick fix to get sis900.c running (which doesn't explain why the PCI Device ID changed from 2.6.3-rc2 to 2.6.6) :
change line 263 from

	if ((isa_bridge = pci_find_device(0x1039, 0x0008, isa_bridge)) == NULL
to
	if ((isa_bridge = pci_find_device(0x1039, 0x0018, isa_bridge)) == NULL

I'm not sure I understand your message.

Are you suggesting
a) the hardware PCI id changed from 0x0008 to 0x0018 when booting 2.6.6. or
b) sis900.c changed when booting 2.6.6.

If "a", the PCI id in sis900.c seems to be 0x0008 in both 2.4 and 2.6. And further, I did not see any changes to this line of code in while searching 2.6.2 -> 2.6.6 patches on ftp.kernel.org. I would lean towards a solution that modified sis900.c to check for -both- 0x08 and 0x18.

If "b", I bet that is a problem related to ACPI or some other non-sis900.c piece of code :) sis900.c has not changed very much in the past several kernel releases.

Jeff

#2 lore raw
Quoted 10 lines · Jeff Garzik
Quoted 8 lines · Eric BENARD / Free

1- bad PCI device ID for SiS ISA bridge

2- In 2.6.3-rc2 (and 2.4.x), the PCI device ID of the ISA bridge of the SiS630e is 0x0008. This ID is used by sis900.c in order to get the MAC adress.
In 2.6.6, the PCI device ID of the ISA bridge of the SiS630E is 0x0018. The SiS900 driver fail to read MAC adress and exit with the following message :
eth0: Can not find ISA bridge

[...]

[...]

Quoted 11 lines

I'm not sure I understand your message.

Are you suggesting
a) the hardware PCI id changed from 0x0008 to 0x0018 when booting 2.6.6. or
b) sis900.c changed when booting 2.6.6.

If "a", the PCI id in sis900.c seems to be 0x0008 in both 2.4 and 2.6. And further, I did not see any changes to this line of code in while searching 2.6.2 -> 2.6.6 patches on ftp.kernel.org. I would lean towards a solution that modified sis900.c to check for -both- 0x08 and 0x18.

I'm not sure I understand the message, either. I can confirm that SiS's LPC-to-ISA bridges can change their device ID based on writes to the PCI config space -- 0x08 and 0x18 are both valid ids for that hardware.

Eric, if you'll send me an lspci -xxx on the ISA bridge run under both kernels, that may be interesting. Then the fun part will be finding what changed in the kernel to cause that.

In any event, I think it would be valid to have sis900 check for both ids.

Dave

#3 lore raw
Quoted 8 lines · David Dillow

I'm not sure I understand the message, either. I can confirm that SiS's LPC-to-ISA bridges can change their device ID based on writes to the PCI config space -- 0x08 and 0x18 are both valid ids for that hardware.

Eric, if you'll send me an lspci -xxx on the ISA bridge run under both kernels, that may be interesting. Then the fun part will be finding what changed in the kernel to cause that.

2.6.6
0000:00:01.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge)
00: 39 10 18 00 0f 00 00 02 00 00 01 06 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: c8 80 0a 0c 0b 00 14 19 10 ef 00 00 11 20 04 01
50: 11 28 02 01 60 0a 63 0a a9 04 12 00 4d 17 00 00
60: 00 80 c0 80 40 c1 00 00 00 00 80 00 80 80 00 00
70: 80 00 d8 01 00 50 00 00 00 00 00 00 01 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

2.6.3-rc2
0000:00:01.0 ISA bridge: Silicon Integrated Systems [SiS] SiS85C503/5513 (LPC Bridge)
00: 39 10 08 00 0f 00 00 02 00 00 01 06 00 00 80 00
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
40: 88 80 0a 0c 0b 00 14 19 10 ef 00 00 11 20 04 01
50: 11 28 02 01 62 0a 63 0a a9 04 12 00 4d 17 00 00
60: 0c 80 c0 80 40 c1 00 00 00 00 80 00 80 80 00 00
70: 80 00 d8 01 00 50 00 00 00 00 00 00 01 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Quoted 3 lines

In any event, I think it would be valid to have sis900 check for both ids.

Here is a patch for this.

Eric

drivers/net/sis900.c +4 -2
@@ -261,8 +261,10 @@
 	int i;
 
 	if ((isa_bridge = pci_find_device(0x1039, 0x0008, isa_bridge)) == NULL) {
-		printk("%s: Can not find ISA bridge\n", net_dev->name);
-		return 0;
+		if ((isa_bridge = pci_find_device(0x1039, 0x0018, isa_bridge)) == NULL) {
+			printk("%s: Can not find ISA bridge\n", net_dev->name);
+			return 0;
+		}
 	}
 	pci_read_config_byte(isa_bridge, 0x48, &reg);
 	pci_write_config_byte(isa_bridge, 0x48, reg | 0x40);
#4 lore raw
In reply to Jeff Garzik
Quoted 11 lines · Jeff Garzik

Are you suggesting
a) the hardware PCI id changed from 0x0008 to 0x0018 when booting 2.6.6. or
b) sis900.c changed when booting 2.6.6.

If "a", the PCI id in sis900.c seems to be 0x0008 in both 2.4 and 2.6. And further, I did not see any changes to this line of code in while searching 2.6.2 -> 2.6.6 patches on ftp.kernel.org. I would lean towards a solution that modified sis900.c to check for -both- 0x08 and 0x18.

This is what I mean in my email.
Yes sis900.c should check for both 0x08 and 0x18.
But, I don't understand why the ID has changed (on the same hardware) between 2.6.3 & 2.6.6

Eric

#5 lore raw
Quoted 4 lines · Eric BENARD / Free

This is what I mean in my email.
Yes sis900.c should check for both 0x08 and 0x18.
But, I don't understand why the ID has changed (on the same hardware) between 2.6.3 & 2.6.6

sis900 didn't change in the past few kernel versions, so there must be something else somewhere that changed the ID, as Jeff pointed out.

But since that ID is also valid, I'll make a patch for this issue also (I'm still working on the patch for the other bug that came out in another thread).

Bye.

Signature · 3 lines
-----------------------------
Daniele Venzano
Web: http://teg.homeunix.org