diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-09-05 13:21:50 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2005-09-05 13:21:50 +0000 |
commit | 25912ea3a79e402ad5e2b3e92059c9ae71551f65 (patch) | |
tree | 218e0649e253fc29ff37b977741f9dba351838c4 /sys/dev/pci/pciide.c | |
parent | 301ba798836a8a1229a915a8e2f9c5efca8b2370 (diff) |
If we have a match for the PCI ID we don't care what the PCI class is.
It is often not mass storage anyway. Remove IDE_PCI_CLASS_OVERRIDE
which forced matching when class was not mass storage, just use PCI ID.
ok grange@
Diffstat (limited to 'sys/dev/pci/pciide.c')
-rw-r--r-- | sys/dev/pci/pciide.c | 116 |
1 files changed, 56 insertions, 60 deletions
diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index 9425c3184e1..6d6cc8f5ec8 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pciide.c,v 1.201 2005/08/18 13:40:00 jsg Exp $ */ +/* $OpenBSD: pciide.c,v 1.202 2005/09/05 13:21:49 jsg Exp $ */ /* $NetBSD: pciide.c,v 1.127 2001/08/03 01:31:08 tsutsui Exp $ */ /* @@ -284,8 +284,7 @@ struct pciide_product_desc { }; /* Flags for ide_flags */ -#define IDE_PCI_CLASS_OVERRIDE 0x0001 /* accept even if class != pciide */ -#define IDE_16BIT_IOSPACE 0x0002 /* I/O space BARS ignore upper word */ +#define IDE_16BIT_IOSPACE 0x0001 /* I/O space BARS ignore upper word */ /* Default product description for devices not known from this controller */ const struct pciide_product_desc default_product_desc = { @@ -356,7 +355,7 @@ const struct pciide_product_desc pciide_intel_products[] = { piix_chip_map }, { PCI_PRODUCT_INTEL_82801ER_SATA, /* Intel 82801ER (ICH5R) SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map }, #ifdef notyet @@ -366,39 +365,39 @@ const struct pciide_product_desc pciide_intel_products[] = { }, #endif { PCI_PRODUCT_INTEL_6300ESB_IDE, /* Intel 6300ESB IDE */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map }, { PCI_PRODUCT_INTEL_6300ESB_SATA, /* Intel 6300ESB SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map }, { PCI_PRODUCT_INTEL_6300ESB_SATA2, /* Intel 6300ESB SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map }, { PCI_PRODUCT_INTEL_82801FB_IDE, /* Intel 82801FB (ICH6) IDE */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map }, { PCI_PRODUCT_INTEL_82801FBM_IDE, /* Intel 82801FBM (ICH6M) IDE */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map }, { PCI_PRODUCT_INTEL_82801FB_SATA, /* Intel 82801FB (ICH6) SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map }, { PCI_PRODUCT_INTEL_82801FR_SATA, /* Intel 82801FR (ICH6R) SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map }, { PCI_PRODUCT_INTEL_82801GB_IDE, /* Intel 82801GB (ICH7) IDE */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map }, { PCI_PRODUCT_INTEL_82801GB_SATA_1, /* Intel 82801GB (ICH7) SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, piix_chip_map } }; @@ -454,31 +453,31 @@ const struct pciide_product_desc pciide_cmd_products[] = { cmd0643_9_chip_map }, { PCI_PRODUCT_CMDTECH_648, /* CMD Technology PCI0648 */ - IDE_PCI_CLASS_OVERRIDE, + 0, cmd0643_9_chip_map }, { PCI_PRODUCT_CMDTECH_649, /* CMD Technology PCI0649 */ - IDE_PCI_CLASS_OVERRIDE, + 0, cmd0643_9_chip_map }, { PCI_PRODUCT_CMDTECH_680, /* CMD Technology PCI0680 */ - IDE_PCI_CLASS_OVERRIDE, + 0, cmd680_chip_map }, { PCI_PRODUCT_CMDTECH_3112, /* SiI3112 SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, sii3112_chip_map }, { PCI_PRODUCT_CMDTECH_3512, /* SiI3512 SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, sii3112_chip_map }, { PCI_PRODUCT_CMDTECH_AAR_1210SA, /* Adaptec AAR-1210SA */ - IDE_PCI_CLASS_OVERRIDE, + 0, sii3112_chip_map }, { PCI_PRODUCT_CMDTECH_3114, /* SiI3114 */ - IDE_PCI_CLASS_OVERRIDE, + 0, sii3114_chip_map } }; @@ -493,7 +492,7 @@ const struct pciide_product_desc pciide_via_products[] = { apollo_chip_map }, { PCI_PRODUCT_VIATECH_VT8237_SATA, /* VIA VT8237 SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, sata_chip_map } }; @@ -511,15 +510,15 @@ const struct pciide_product_desc pciide_sis_products[] = { sis_chip_map }, { PCI_PRODUCT_SIS_180, /* SIS 180 SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, sata_chip_map }, { PCI_PRODUCT_SIS_181, /* SIS 181 SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, sata_chip_map }, { PCI_PRODUCT_SIS_182, /* SIS 182 SATA */ - IDE_PCI_CLASS_OVERRIDE, + 0, sata_chip_map } }; @@ -544,125 +543,125 @@ const struct pciide_product_desc pciide_acer_products[] = { const struct pciide_product_desc pciide_triones_products[] = { { PCI_PRODUCT_TRIONES_HPT366, /* Highpoint HPT36x/37x IDE */ - IDE_PCI_CLASS_OVERRIDE, + 0, hpt_chip_map, }, { PCI_PRODUCT_TRIONES_HPT372A, /* Highpoint HPT372A IDE */ - IDE_PCI_CLASS_OVERRIDE, + 0, hpt_chip_map }, { PCI_PRODUCT_TRIONES_HPT302, /* Highpoint HPT302 IDE */ - IDE_PCI_CLASS_OVERRIDE, + 0, hpt_chip_map }, { PCI_PRODUCT_TRIONES_HPT371, /* Highpoint HPT371 IDE */ - IDE_PCI_CLASS_OVERRIDE, + 0, hpt_chip_map }, { PCI_PRODUCT_TRIONES_HPT374, /* Highpoint HPT374 IDE */ - IDE_PCI_CLASS_OVERRIDE, + 0, hpt_chip_map } }; const struct pciide_product_desc pciide_promise_products[] = { { PCI_PRODUCT_PROMISE_PDC20246, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20262, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20265, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20267, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20268, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20268R, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20269, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20271, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20275, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20276, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20277, - IDE_PCI_CLASS_OVERRIDE, + 0, pdc202xx_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20318, - IDE_PCI_CLASS_OVERRIDE, + 0, pdcsata_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20319, - IDE_PCI_CLASS_OVERRIDE, + 0, pdcsata_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20371, - IDE_PCI_CLASS_OVERRIDE, + 0, pdcsata_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20375, - IDE_PCI_CLASS_OVERRIDE, + 0, pdcsata_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20376, - IDE_PCI_CLASS_OVERRIDE, + 0, pdcsata_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20377, - IDE_PCI_CLASS_OVERRIDE, + 0, pdcsata_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20378, - IDE_PCI_CLASS_OVERRIDE, + 0, pdcsata_chip_map, }, { PCI_PRODUCT_PROMISE_PDC20379, - IDE_PCI_CLASS_OVERRIDE, + 0, pdcsata_chip_map, } }; const struct pciide_product_desc pciide_acard_products[] = { { PCI_PRODUCT_ACARD_ATP850U, /* Acard ATP850U Ultra33 Controller */ - IDE_PCI_CLASS_OVERRIDE, + 0, acard_chip_map, }, { PCI_PRODUCT_ACARD_ATP860, /* Acard ATP860 Ultra66 Controller */ - IDE_PCI_CLASS_OVERRIDE, + 0, acard_chip_map, }, { PCI_PRODUCT_ACARD_ATP860A, /* Acard ATP860-A Ultra66 Controller */ - IDE_PCI_CLASS_OVERRIDE, + 0, acard_chip_map, }, { PCI_PRODUCT_ACARD_ATP865A, /* Acard ATP865-A Ultra133 Controller */ - IDE_PCI_CLASS_OVERRIDE, + 0, acard_chip_map, }, { PCI_PRODUCT_ACARD_ATP865R, /* Acard ATP865-R Ultra133 Controller */ - IDE_PCI_CLASS_OVERRIDE, + 0, acard_chip_map, } }; @@ -731,18 +730,18 @@ const struct pciide_product_desc pciide_nvidia_products[] = { const struct pciide_product_desc pciide_ite_products[] = { { PCI_PRODUCT_ITEXPRESS_IT8212F, - IDE_PCI_CLASS_OVERRIDE, + 0, ite_chip_map } }; const struct pciide_product_desc pciide_ati_products[] = { { PCI_PRODUCT_ATI_IXP_SATA_400_1, - IDE_PCI_CLASS_OVERRIDE, + 0, sii3112_chip_map }, { PCI_PRODUCT_ATI_IXP_SATA_400_2, - IDE_PCI_CLASS_OVERRIDE, + 0, sii3112_chip_map } }; @@ -856,7 +855,6 @@ int pciide_match(struct device *parent, void *match, void *aux) { struct pci_attach_args *pa = aux; - const struct pciide_product_desc *pp; /* * Some IDE controllers have severe bugs when used in PCI mode. @@ -880,10 +878,8 @@ pciide_match(struct device *parent, void *match, void *aux) * Some controllers (e.g. promise Ultra-33) don't claim to be PCI IDE * controllers. Let see if we can deal with it anyway. */ - pp = pciide_lookup_product(pa->pa_id); - if (pp && (pp->ide_flags & IDE_PCI_CLASS_OVERRIDE)) { + if (pciide_lookup_product(pa->pa_id)) return (1); - } return (0); } |