From ade68ea22667767523e19e8db0e399dc1d203ecc Mon Sep 17 00:00:00 2001 From: Julian Elischer Date: Thu, 10 Feb 2005 22:26:28 +0000 Subject: [PATCH] Take into account that Pinnacle screwed up their PCI ID in the beginning.. Older cards have it reversed. Also, use some already defined values instead of magic numbers. PR: 73324 Submitted by: arne_woerner@yahoo.com MFC after: 1 week --- sys/dev/bktr/bktr_card.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/dev/bktr/bktr_card.c b/sys/dev/bktr/bktr_card.c index 8d9a6810cf9f..aa224d984654 100644 --- a/sys/dev/bktr/bktr_card.c +++ b/sys/dev/bktr/bktr_card.c @@ -591,8 +591,8 @@ static int locate_eeprom_address( bktr_ptr_t bktr) { #define PCI_VENDOR_LEADTEK_ALT_3 0x107d #define PCI_VENDOR_FLYVIDEO 0x1851 #define PCI_VENDOR_FLYVIDEO_2 0x1852 -#define PCI_VENDOR_PINNACLE_ALT 0xBD11 #define PCI_VENDOR_IODATA 0x10fc +#define PCI_VENDOR_PINNACLE_ALT 0xBD11 /* They got their own ID backwards? */ #define PCI_VENDOR_PINNACLE_NEW 0x11BD #define MODEL_IODATA_GV_BCTV3_PCI 0x4020 @@ -724,15 +724,16 @@ probeCard( bktr_ptr_t bktr, int verbose, int unit ) goto checkTuner; } - if (subsystem_vendor_id == PCI_VENDOR_PINNACLE_ALT) { + if (subsystem_vendor_id == PCI_VENDOR_PINNACLE_ALT || + subsystem_vendor_id == PCI_VENDOR_PINNACLE_NEW) { bktr->card = cards[ (card = CARD_MIRO) ]; bktr->card.eepromAddr = eeprom_i2c_address; bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE); goto checkTuner; } - if (subsystem_vendor_id == 0x10fc && - subsystem_id == 0x4020) { + if (subsystem_vendor_id == PCI_VENDOR_IODATA && + subsystem_id == MODEL_IODATA_GV_BCTV3_PCI) { bktr->card = cards[ (card = CARD_IO_BCTV3) ]; bktr->card.eepromAddr = eeprom_i2c_address; bktr->card.eepromSize = (u_char)(256 / EEPROMBLOCKSIZE);