Date: Fri, 16 Jan 2004 20:25:56 +0000 (UTC) From: "Bjoern A. Zeeb" <bzeeb-lists@lists.zabbadoz.net> To: current@freebsd.org Subject: PCI rerouting Message-ID: <Pine.BSF.4.53.0401162014330.66397@e0-0.zab2.int.zabbadoz.net>
next in thread | raw e-mail | index | archive | help
Hi, back last year I had trouble with some PCI rerouting: http://lists.freebsd.org/pipermail/freebsd-current/2003-July/thread.html#7155 Noriyoshi Kawano came up with the attached patch but it hadn't been committed because it was unknown why a kernel panic happens at boot time. Today I rebuilt a kernel from HEAD and still had trouble so the tunable saved my weekend. Can we somehow get this debugged and sorted out ? --- compile-20040113-01/sys/dev/pci/pci.c.orig Tue Jan 13 09:39:03 2004 +++ compile-20040113-01/sys/dev/pci/pci.c Tue Jan 13 22:16:29 2004 @@ -173,6 +173,12 @@ enable these bits correctly. We'd like to do this all the time, but there\n\ are some peripherals that this causes problems with."); +static int pci_enable_rerouting = 1; +TUNABLE_INT("hw.pci.enable_rerouting", (int *)&pci_enable_rerouting); +SYSCTL_INT(_hw_pci, OID_AUTO, enable_rerouting, CTLFLAG_RW, + &pci_enable_rerouting, 1, + "Enable try to re-route interrupts."); + /* Find a device_t by bus/slot/function */ device_t @@ -817,6 +823,9 @@ if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) { #if defined(__ia64__) || defined(__i386__) || defined(__amd64__) + if (!pci_enable_rerouting){ + goto nottry; + } /* * Try to re-route interrupts. Sometimes the BIOS or * firmware may leave bogus values in these registers. @@ -828,6 +837,7 @@ pci_write_config(dev, PCIR_INTLINE, irq, 1); cfg->intline = irq; } else +nottry: #endif irq = cfg->intline; resource_list_add(rl, SYS_RES_IRQ, 0, irq, irq, 1); -- Bjoern A. Zeeb bzeeb at Zabbadoz dot NeT 56 69 73 69 74 http://www.zabbadoz.net/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.53.0401162014330.66397>