diff --git a/configure.ac b/configure.ac index 8a1b73f20..9c969fefb 100644 --- a/configure.ac +++ b/configure.ac @@ -1329,6 +1329,7 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then CFLAGS=$PCIACCESS_CFLAGS LIBS=$PCIACCESS_LIBS AC_CHECK_FUNCS([pci_system_init_dev_mem]) + AC_CHECK_FUNCS([pci_device_enable]) LIBS=$SAVE_LIBS CFLAGS=$SAVE_CFLAGS XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS" diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c index 574843473..9e2c6199c 100644 --- a/hw/xfree86/os-support/linux/int10/linux.c +++ b/hw/xfree86/os-support/linux/int10/linux.c @@ -278,6 +278,10 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) struct pci_device *rom_device = xf86GetPciInfoForEntity(pInt->entityIndex); +#if HAVE_PCI_DEVICE_ENABLE + pci_device_enable(rom_device); +#endif + err = pci_device_read_rom(rom_device, (unsigned char *)(V_BIOS)); if (err) { xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (%s)\n", diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in index 5587c0a8d..e05d3bfd3 100644 --- a/include/xorg-config.h.in +++ b/include/xorg-config.h.in @@ -118,6 +118,9 @@ /* Have pci_system_init_dev_mem() */ #undef HAVE_PCI_SYSTEM_INIT_DEV_MEM +/* Have pci_enable_device */ +#undef HAVE_PCI_DEVICE_ENABLE + /* Path to text files containing PCI IDs */ #undef PCI_TXT_IDS_PATH