From fb6067c507f47e8f751766c84aec607247e1c594 Mon Sep 17 00:00:00 2001 From: beveloper Date: Fri, 28 Feb 2003 14:52:05 +0000 Subject: [PATCH] removed experimental special case fixed bug in get_nth_pci_info git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2852 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/addons/bus_managers/pci/pci.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/kernel/core/addons/bus_managers/pci/pci.c b/src/kernel/core/addons/bus_managers/pci/pci.c index 90d28a3889..884df0563d 100755 --- a/src/kernel/core/addons/bus_managers/pci/pci.c +++ b/src/kernel/core/addons/bus_managers/pci/pci.c @@ -13,7 +13,6 @@ #include #include #include -#include /* for spinlocks */ #include #include #include @@ -84,7 +83,6 @@ static void write_pci_config (uchar, uchar, uchar, uchar, uchar, uint32); #define PCI_PRODUCT_INTEL_82443BX 0x7190 #define PCI_PRODUCT_INTEL_82443BX_AGP 0x7191 #define PCI_PRODUCT_INTEL_82443BX_NOAGP 0x7192 -#define PCI_PRODUCT_INTEL_82845_AGP 0x1a31 /* Config space locking! * We need to make sure we only have one access at a time into the config space, @@ -599,20 +597,6 @@ fixup_bridge(uint8 bus, uint8 dev, uint8 func) } break; } - case PCI_PRODUCT_INTEL_82845_AGP: { - /* Foward accesses to VGA memory onto the AGP card - * - * This is very experimental! Added to see if this will - * fix Marcus's problem with this device. - */ - uint8 ctrl = read_pci_config(bus, dev, func, 0x3e, 1); - - if ((ctrl & 0x04) != 0x04) { - dprintf("Enabling VGA_EN1 for Intel 82845 AGP Bridge\n"); - ctrl |= 0x04; - write_pci_config(bus, dev, func, 0x3e, 1, ctrl); - } - } } } } @@ -1260,7 +1244,7 @@ get_nth_pci_info(long index, pci_info *copyto) * 2) The found_device_structure has a NULL pointer for * info, which would cause a segfault when we try to memcpy! */ - if (iter > 0 || !pd->info) + if (iter > 0 || !pd || !pd->info) return B_DEV_ID_ERROR; memcpy(copyto, pd->info, sizeof(pci_info));