From owner-freebsd-current@FreeBSD.ORG Fri Jun 6 07:25:58 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 954CF37B401 for ; Fri, 6 Jun 2003 07:25:58 -0700 (PDT) Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by mx1.FreeBSD.org (Postfix) with ESMTP id C82F943F85 for ; Fri, 6 Jun 2003 07:25:57 -0700 (PDT) (envelope-from winter@jurai.net) Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by sasami.jurai.net (8.12.9/8.12.9) with ESMTP id h56EPt3q003296; Fri, 6 Jun 2003 10:25:55 -0400 (EDT) (envelope-from winter@jurai.net) Date: Fri, 6 Jun 2003 10:25:55 -0400 (EDT) From: "Matthew N. Dodd" To: Alexander Leidinger In-Reply-To: <20030606125146.72adad8c.Alexander@Leidinger.net> Message-ID: <20030606102248.B52781@sasami.jurai.net> References: <20030605161425.71dec07a.Alexander@Leidinger.net> <200306052056.57000.michaelnottebrock@gmx.net> <20030606125146.72adad8c.Alexander@Leidinger.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: Jeremy Messenger cc: current@freebsd.org Subject: Re: VIA ACPI power management controller 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, 06 Jun 2003 14:25:58 -0000 On Fri, 6 Jun 2003, Alexander Leidinger wrote: > This problem is under investigation. We already know why this error gets > printed, but there is still a discussion how to fix it cleanly. This is what I'll likely commit in the short term. Index: pci.c =================================================================== RCS file: /home/cvs/ncvs/src/sys/dev/pci/pci.c,v retrieving revision 1.215 diff -u -u -r1.215 pci.c --- pci.c 31 May 2003 20:34:36 -0000 1.215 +++ pci.c 4 Jun 2003 12:38:12 -0000 @@ -175,6 +175,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_disable_io_mode_sanity = 0; +TUNABLE_INT("hw.pci.disable_io_mode_sanity", (int *)&pci_disable_io_mode_sanity); +SYSCTL_INT(_hw_pci, OID_AUTO, disable_io_mode_sanity, CTLFLAG_RW, + &pci_disable_io_mode_sanity, 0, + "Disable PCI IO mode sanity checks in resource allocation."); + /* Find a device_t by bus/slot/function */ device_t @@ -1326,6 +1332,7 @@ struct pci_devinfo *dinfo = device_get_ivars(child); struct resource_list *rl = &dinfo->resources; pcicfgregs *cfg = &dinfo->cfg; + int error; /* * Perform lazy resource allocation @@ -1358,7 +1365,8 @@ * Enable the I/O mode. We should also be allocating * resources too. XXX */ - if (PCI_ENABLE_IO(dev, child, type)) + error = PCI_ENABLE_IO(dev, child, type); + if (error && !pci_disable_io_mode_sanity) return (NULL); break; } -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever |