2009-08-04 21:52:16 +02:00
|
|
|
Index: linuxPci.c
|
2010-03-20 03:42:15 +01:00
|
|
|
================================================================================
|
|
|
|
--- linuxPci.c
|
2009-08-04 21:52:16 +02:00
|
|
|
+++ linuxPci.c
|
2010-03-20 03:42:15 +01:00
|
|
|
@@ -195,7 +195,7 @@
|
2009-02-26 03:43:28 +01:00
|
|
|
struct pci_id_match bridge_match = {
|
|
|
|
PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
|
|
|
|
(PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_PCI << 8),
|
|
|
|
- 0
|
|
|
|
+ (PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_PCI << 8)
|
|
|
|
};
|
|
|
|
struct pci_device *bridge;
|
|
|
|
struct pci_device_iterator *iter;
|
2010-03-20 03:42:15 +01:00
|
|
|
@@ -433,7 +433,6 @@
|
2009-02-26 03:43:28 +01:00
|
|
|
xf86MapLegacyIO(struct pci_device *dev)
|
|
|
|
{
|
|
|
|
const int domain = dev->domain;
|
|
|
|
- struct pci_device *bridge = get_parent_bridge(dev);
|
|
|
|
int fd;
|
|
|
|
|
|
|
|
if (domain >= MAX_DOMAINS)
|
2010-03-20 03:42:15 +01:00
|
|
|
@@ -441,9 +440,11 @@
|
2009-02-26 03:43:28 +01:00
|
|
|
|
|
|
|
if (DomainMmappedIO[domain] == NULL) {
|
|
|
|
/* Permanently map all of I/O space */
|
|
|
|
- fd = linuxOpenLegacy(bridge, "legacy_io");
|
|
|
|
+ fd = linuxOpenLegacy(dev, "legacy_io");
|
|
|
|
if (fd < 0) {
|
|
|
|
- DomainMmappedIO[domain] = linuxMapPci(-1, VIDMEM_MMIO, bridge,
|
|
|
|
+ struct pci_device *bridge = get_parent_bridge(dev);
|
|
|
|
+ if (bridge != NULL)
|
|
|
|
+ DomainMmappedIO[domain] = linuxMapPci(-1, VIDMEM_MMIO, bridge,
|
|
|
|
0, linuxGetIOSize(bridge),
|
|
|
|
PCIIOC_MMAP_IS_IO);
|
|
|
|
}
|