Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Jun 2003 10:25:55 -0400 (EDT)
From:      "Matthew N. Dodd" <winter@jurai.net>
To:        Alexander Leidinger <Alexander@Leidinger.net>
Cc:        current@freebsd.org
Subject:   Re: VIA ACPI power management controller
Message-ID:  <20030606102248.B52781@sasami.jurai.net>
In-Reply-To: <20030606125146.72adad8c.Alexander@Leidinger.net>
References:  <20030605161425.71dec07a.Alexander@Leidinger.net> <200306052056.57000.michaelnottebrock@gmx.net> <oprqa8dtor8ckrg5@smtp.central.cox.net> <20030606125146.72adad8c.Alexander@Leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 |



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030606102248.B52781>