From owner-freebsd-current@FreeBSD.ORG Tue Sep 2 20:59:56 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5A1C616A4BF for ; Tue, 2 Sep 2003 20:59:56 -0700 (PDT) Received: from possum.icir.org (possum.icir.org [192.150.187.67]) by mx1.FreeBSD.org (Postfix) with ESMTP id BD25943FEA for ; Tue, 2 Sep 2003 20:59:55 -0700 (PDT) (envelope-from pavlin@possum.icir.org) Received: from possum.icir.org (localhost [127.0.0.1]) by possum.icir.org (8.12.8p1/8.12.3) with ESMTP id h833xtam098987; Tue, 2 Sep 2003 20:59:55 -0700 (PDT) (envelope-from pavlin@possum.icir.org) Message-Id: <200309030359.h833xtam098987@possum.icir.org> To: freebsd-current@freebsd.org Date: Tue, 02 Sep 2003 20:59:55 -0700 From: Pavlin Radoslavov cc: pavlin@icir.org Subject: Problem with rerouting interrupts and dc quad ethernet card X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2003 03:59:56 -0000 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@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 AMD Features=0xc0440000 real memory = 134152192 (127 MB) avail memory = 114823168 (109 MB) Pentium Pro MTRR support enabled npx0: on motherboard npx0: INT 16 interface pcibios: BIOS version 2.10 Using $PIR table, 9 entries at 0xc00fddd0 pcib0: at pcibus 0 on motherboard pci0: 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: at device 1.0 on pci0 pci1: on pcib1 pci_cfgintr: 0:1 INTA routed to irq 5 pcib1: slot 0 INTA is routed to irq 5 pci1: at device 0.0 (no driver attached) isab0: at device 7.0 on pci0 isa0: on isab0 pci0: at device 7.1 (no driver attached) dc0: port 0xb800-0xb8ff mem 0xda401000-0xda4013ff irq 11 at device 8.0 on pci0 dc0: Ethernet address: 00:03:6d:1c:cf:a0 miibus0: on dc0 ukphy0: on miibus0 ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp0: 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: on fxp0 inphy0: on miibus1 inphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp1: 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: on fxp1 inphy1: on miibus2 inphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp2: 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: on fxp2 inphy2: on miibus3 inphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto fxp3: 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: on fxp3 inphy3: on miibus4 inphy3: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto pcib2: at device 17.0 on pci0 pci2: 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: port 0xa000-0xa07f mem 0xd9000000-0xd90003ff irq 5 at device 4.0 on pci2 dc1: Ethernet address: 00:80:c8:b9:05:59 miibus5: on dc1 ukphy1: on miibus5 ukphy1: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto dc2: port 0xa400-0xa47f mem 0xd9001000-0xd90013ff irq 11 at device 5.0 on pci2 dc2: Ethernet address: 00:80:c8:b9:05:5a miibus6: on dc2 ukphy2: on miibus6 ukphy2: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto dc3: port 0xa800-0xa87f mem 0xd9002000-0xd90023ff irq 10 at device 6.0 on pci2 dc3: Ethernet address: 00:80:c8:b9:05:5b miibus7: on dc3 ukphy3: on miibus7 ukphy3: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto dc4: port 0xac00-0xac7f mem 0xd9003000-0xd90033ff irq 5 at device 7.0 on pci2 dc4: Ethernet address: 00:80:c8:b9:05:5c miibus8: on dc4 ukphy4: on miibus8 ukphy4: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto orm0: