VIA ACPI power management controller
Matthew N. Dodd
winter at jurai.net
Fri Jun 6 07:25:58 PDT 2003
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 at jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax |
| http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever |
More information about the freebsd-current
mailing list