From owner-freebsd-current@FreeBSD.ORG Fri Jan 16 12:30:14 2004 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 CEB0316A4CE for ; Fri, 16 Jan 2004 12:30:14 -0800 (PST) Received: from transport.cksoft.de (transport.cksoft.de [62.111.66.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49AA243D2F for ; Fri, 16 Jan 2004 12:30:10 -0800 (PST) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from transport.cksoft.de (localhost [127.0.0.1]) by transport.cksoft.de (Postfix) with ESMTP id CFC4C1FF9A6 for ; Fri, 16 Jan 2004 21:30:08 +0100 (CET) Received: by transport.cksoft.de (Postfix, from userid 66) id 49DFE1FF931; Fri, 16 Jan 2004 21:30:07 +0100 (CET) Received: by mail.int.zabbadoz.net (Postfix, from userid 1060) id 5F448155E3; Fri, 16 Jan 2004 20:25:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.int.zabbadoz.net (Postfix) with ESMTP id 54D1A15336 for ; Fri, 16 Jan 2004 20:25:56 +0000 (UTC) Date: Fri, 16 Jan 2004 20:25:56 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@e0-0.zab2.int.zabbadoz.net To: current@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS cksoft-s20020300-20031204bz on transport.cksoft.de Subject: PCI rerouting 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: Fri, 16 Jan 2004 20:30:14 -0000 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/