card match detection for AGP updated

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8397 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rudolf Cornelissen 2004-07-14 18:36:54 +00:00
parent 5ff9c0d972
commit 24223277db
3 changed files with 11 additions and 1 deletions

View File

@ -101,6 +101,9 @@ typedef struct {
uint16 vendor_id; /* PCI vendor ID, from pci_info */
uint16 device_id; /* PCI device ID, from pci_info */
uint8 revision; /* PCI device revsion, from pci_info */
uint8 bus; /* PCI bus number, from pci_info */
uint8 device; /* PCI device number on bus, from pci_info */
uint8 function; /* PCI function number in device, from pci_info */
/* bug workaround for 4.5.0 */
uint32 use_clone_bugfix; /*for 4.5.0, cloning of physical memory does not work*/

View File

@ -70,7 +70,11 @@ status_t nv_agp_setup(void)
LOG(4,("AGP: AGP capable device #%d:\n", (index + 1)));
/* see if we are this one */
if (((((uint32)(nai.agpi.device_id)) << 16) | nai.agpi.vendor_id) == CFGR(DEVID))
if ((nai.agpi.device_id == si->device_id) &&
(nai.agpi.vendor_id == si->vendor_id) &&
(nai.agpi.bus == si->bus) &&
(nai.agpi.device == si->device) &&
(nai.agpi.function == si->function))
{
LOG(4,("AGP: (this is the device this accelerant controls)\n"));
agp = true;

View File

@ -779,6 +779,9 @@ static status_t open_hook (const char* name, uint32 flags, void** cookie) {
si->vendor_id = di->pcii.vendor_id;
si->device_id = di->pcii.device_id;
si->revision = di->pcii.revision;
si->bus = di->pcii.bus;
si->device = di->pcii.device;
si->function = di->pcii.function;
/* map the device */
result = map_device(di);