xorg-x11-server/bug474071-fix1.diff
Stefan Dirsch 7e6a980b1f Accepting request 35298 from home:oertel:branches:openSUSE:Factory
Copy from home:oertel:branches:openSUSE:Factory/xorg-x11-server via accept of submit request 35298 revision 8.
Request was accepted with message:
reviewed ok.

OBS-URL: https://build.opensuse.org/request/show/35298
OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/xorg-x11-server?expand=0&rev=229
2010-03-20 02:42:15 +00:00

36 lines
1.1 KiB
Diff

Index: linuxPci.c
================================================================================
--- linuxPci.c
+++ linuxPci.c
@@ -195,7 +195,7 @@
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;
@@ -433,7 +433,6 @@
xf86MapLegacyIO(struct pci_device *dev)
{
const int domain = dev->domain;
- struct pci_device *bridge = get_parent_bridge(dev);
int fd;
if (domain >= MAX_DOMAINS)
@@ -441,9 +440,11 @@
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);
}