# HG changeset patch # Parent 1805eb187340865e56b0c4bb7bf4c1ed4871f956 Don't forget to check the vendor. There's still all kinds of things wrong here, but this will get past the initial failure that caused it to try to claim other cards. diff -r 1805eb187340 -r 9ad75f96efc9 sys/dev/pms/freebsd/driver/common/lxutil.c --- a/sys/dev/pms/freebsd/driver/common/lxutil.c +++ b/sys/dev/pms/freebsd/driver/common/lxutil.c @@ -757,18 +757,25 @@ STATIC int agtiapi_ProbeCard( device_t d { int idx; static U32 cardMap[4] = { 0, 0, 0, 0 }; + u_int16_t agtiapi_vendor; // PCI vendor ID u_int16_t agtiapi_dev; // PCI device ID AGTIAPI_PRINTK("agtiapi_ProbeCard: start\n"); +#if 0 if ( ! atomic_cmpset_32( &cardMap[thisCard], 0, 5 ) ) { // card already ran AGTIAPI_PRINTK( "We'll only ID this card once -- %d\n", thisCard ); return 2; // error return value; card already ran this function } else { +#else + { +#endif + agtiapi_vendor = pci_get_vendor( dev ); // get PCI vendor ID agtiapi_dev = pci_get_device( dev ); // get PCI device ID for( idx = 0; idx < COUNT(ag_card_type); idx++ ) { - if( ag_card_type[idx].deviceId == agtiapi_dev ) + if( ag_card_type[idx].deviceId == agtiapi_dev && + ag_card_type[idx].vendorId == agtiapi_vendor) { // device ID match memset( (void *)&agCardInfoList[ thisCard ], 0, sizeof(ag_card_info_t) );