Problem with rerouting interrupts and dc quad ethernet card

From: Pavlin Radoslavov <pavlin_at_icir.org>
Date: Tue, 02 Sep 2003 20:59:55 -0700
OS: FreeBSD-CURRENT built within PicoBSD
Hardware: headless single-CPU PC with three Ethetnet cards:
  - one single-interface dc card
  - one quad fxp card
  - one quad dc card

The kernel boots fine, and I don't have problem assigning IP
addresses on the fxp interfaces. When I try to configure the dc
interfaces (either the single-interace or the quad card), the first
dc interface I attempt to configure is OK, but when I run "ifconfig"
on a second dc interface, the command blocks, and the following
message starts appearing every few seconds on the console:

dc2: watchdog timeout

After some investigation, I found that if I disable the following
code in sys/dev/pci/pci.c (around line 800), then I don't have the
problem anymore:

#if defined(__ia64__) || (defined(__i386__) && !defined(SMP))
		/*
		 * Try to re-route interrupts. Sometimes the BIOS or
		 * firmware may leave bogus values in these registers.
		 * If the re-route fails, then just stick with what we
		 * have.
		 */
		irq = PCI_ASSIGN_INTERRUPT(bus, dev);
		if (PCI_INTERRUPT_VALID(irq)) {
			pci_write_config(dev, PCIR_INTLINE, irq, 1);
			cfg->intline = irq;
		} else
#endif

This particular code was enabled for i386 in revision 1.216 of
sys/dev/pci/pci.c right after the FreeBSD-5.1 release:

http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/pci/pci.c.diff?r1=1.215&r2=1.216

Below I am including the boot message.

Unfortunately, I cannot provide the appropriate fix, but if someone
has a solution I will be glad to test it and provide a feedback.

Thanks,
Pavlin


ROM segment 0x8000 length 0x4000 reloc 0x9400
Boot from (N)etwork or from (L)ocal? N
Etherboot 5.0.0 (GPL) Tagged ELF (FreeBSD) (Multiboot) a.out for [EEPRO100]
Found Intel EtherExpressPro100 at 0xBC00, ROM address 0x0000
Probing...[EEPRO100]Ethernet addr: 00:02:B3:10:E2:E4 
Searching for server (DHCP)...
Me: 192.150.187.101, Server: 192.150.187.68
Loading /home/xorpc/u2/freebsd.kernels/xorp1 (ELF/FreeBSD)... done
WARNING: loader(8) metadata is missing!
Copyright (c) 1992-2003 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD 5.1-CURRENT #1: Tue Sep  2 19:30:30 PDT 2003
    root_at_possum.icir.org:/home/possum/u0/pavlin/picobsd/build_dir-pim/PICOBSD-pim
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: AMD Athlon(tm) Processor (750.03-MHz 686-class CPU)
  Origin = "AuthenticAMD"  Id = 0x642  Stepping = 2
  Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR>
  AMD Features=0xc0440000<RSVD,AMIE,DSP,3DNow!>
real memory  = 134152192 (127 MB)
avail memory = 114823168 (109 MB)
Pentium Pro MTRR support enabled
npx0: <math processor> on motherboard
npx0: INT 16 interface
pcibios: BIOS version 2.10
Using $PIR table, 9 entries at 0xc00fddd0
pcib0: <Host to PCI bridge> at pcibus 0 on motherboard
pci0: <PCI bus> on pcib0
pci_cfgintr: 0:8 INTA BIOS irq 11
pci_cfgintr: 0:9 INTA BIOS irq 10
pci_cfgintr: 0:11 INTA BIOS irq 11
pci_cfgintr: 0:13 INTA BIOS irq 5
pci_cfgintr: 0:15 INTA BIOS irq 5
pcib1: <PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci_cfgintr: 0:1 INTA routed to irq 5
pcib1: slot 0 INTA is routed to irq 5
pci1: <display, VGA> at device 0.0 (no driver attached)
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
pci0: <mass storage, ATA> at device 7.1 (no driver attached)
dc0: <ADMtek AN985 10/100BaseTX> port 0xb800-0xb8ff mem 0xda401000-0xda4013ff irq 11 at device 8.0 on pci0
dc0: Ethernet address: 00:03:6d:1c:cf:a0
miibus0: <MII bus> on dc0
ukphy0: <Generic IEEE 802.3u media interface> on miibus0
ukphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp0: <Intel 82559 Pro/100 Ethernet> port 0xbc00-0xbc3f mem 0xda300000-0xda3fffff,0xda404000-0xda404fff irq 10 at device 9.0 on pci0
fxp0: Ethernet address 00:02:b3:10:e2:e4
miibus1: <MII bus> on fxp0
inphy0: <i82555 10/100 media interface> on miibus1
inphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp1: <Intel 82559 Pro/100 Ethernet> port 0xc000-0xc03f mem 0xda000000-0xda0fffff,0xda403000-0xda403fff irq 11 at device 11.0 on pci0
fxp1: Ethernet address 00:02:b3:10:e2:e2
miibus2: <MII bus> on fxp1
inphy1: <i82555 10/100 media interface> on miibus2
inphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp2: <Intel 82559 Pro/100 Ethernet> port 0xc400-0xc43f mem 0xda100000-0xda1fffff,0xda400000-0xda400fff irq 5 at device 13.0 on pci0
fxp2: Ethernet address 00:02:b3:10:e2:e9
miibus3: <MII bus> on fxp2
inphy2: <i82555 10/100 media interface> on miibus3
inphy2:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
fxp3: <Intel 82559 Pro/100 Ethernet> port 0xc800-0xc83f mem 0xda200000-0xda2fffff,0xda402000-0xda402fff irq 5 at device 15.0 on pci0
fxp3: Ethernet address 00:02:b3:10:e3:e7
miibus4: <MII bus> on fxp3
inphy3: <i82555 10/100 media interface> on miibus4
inphy3:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
pcib2: <PCI-PCI bridge> at device 17.0 on pci0
pci2: <PCI bus> on pcib2
pci_cfgintr: 0:17 INTA routed to irq 5
pcib2: slot 4 INTA is routed to irq 5
pci_cfgintr: 0:17 INTB routed to irq 11
pcib2: slot 5 INTA is routed to irq 11
pci_cfgintr: 0:17 INTD routed to irq 5
pcib2: slot 7 INTA is routed to irq 5
dc1: <Intel 21143 10/100BaseTX> port 0xa000-0xa07f mem 0xd9000000-0xd90003ff irq 5 at device 4.0 on pci2
dc1: Ethernet address: 00:80:c8:b9:05:59
miibus5: <MII bus> on dc1
ukphy1: <Generic IEEE 802.3u media interface> on miibus5
ukphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc2: <Intel 21143 10/100BaseTX> port 0xa400-0xa47f mem 0xd9001000-0xd90013ff irq 11 at device 5.0 on pci2
dc2: Ethernet address: 00:80:c8:b9:05:5a
miibus6: <MII bus> on dc2
ukphy2: <Generic IEEE 802.3u media interface> on miibus6
ukphy2:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc3: <Intel 21143 10/100BaseTX> port 0xa800-0xa87f mem 0xd9002000-0xd90023ff irq 10 at device 6.0 on pci2
dc3: Ethernet address: 00:80:c8:b9:05:5b
miibus7: <MII bus> on dc3
ukphy3: <Generic IEEE 802.3u media interface> on miibus7
ukphy3:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc4: <Intel 21143 10/100BaseTX> port 0xac00-0xac7f mem 0xd9003000-0xd90033ff irq 5 at device 7.0 on pci2
dc4: Ethernet address: 00:80:c8:b9:05:5c
miibus8: <MII bus> on dc4
ukphy4: <Generic IEEE 802.3u media interface> on miibus8
ukphy4:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
orm0: <Option ROMs> at iomem 0xcf000-0xcffff,0xce000-0xcefff,0xcd000-0xcdfff,0xcc000-0xccfff,0xc0000-0xc97ff on isa0
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> at port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on isa0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
atkbdc0: <Keyboard controller (i8042)> at port 0x64,0x60 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
sc0: <System console> on isa0
sc0: VGA <16 virtual consoles, flags=0x0>
sio0 at port 0x3f8-0x3ff irq 4 flags 0x30 on isa0
sio0: type 16550A, console
sio1 at port 0x2f8-0x2ff irq 3 on isa0
sio1: type 16550A
unknown: <PNP0303> can't assign resources (port)
unknown: <PNP0700> can't assign resources (port)
unknown: <PNP0501> can't assign resources (port)
unknown: <PNP0501> can't assign resources (port)
Timecounter "TSC" frequency 750031518 Hz quality 800
Timecounters tick every 10.000 msec
ipfw2 initialized, divert enabled, rule-based forwarding enabled, default to accept, logging disabled
Mounting root from ufs:/dev/md0
Loading /etc from MFS:/fd ...
Updating /etc from /dev/fd0...
mount: /dev/fd0 on /fd: incorrect super block
...
Received on Tue Sep 02 2003 - 18:59:56 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:21 UTC