Index: src/sys/dev/ata/ata-pci.h =================================================================== RCS file: /ncvs/src/sys/dev/ata/ata-pci.h,v retrieving revision 1.95 diff -u -p -r1.95 ata-pci.h --- src/sys/dev/ata/ata-pci.h 25 Nov 2008 00:39:03 -0000 1.95 +++ src/sys/dev/ata/ata-pci.h 16 Dec 2008 05:52:51 -0000 @@ -444,6 +444,7 @@ void ata_dmainit(device_t); extern devclass_t ata_pci_devclass; /* macro for easy definition of all driver module stuff */ +#define ATA_PROBE_OK -10 #define ATA_DECLARE_DRIVER(dname) \ static device_method_t __CONCAT(dname,_methods)[] = { \ DEVMETHOD(device_probe, __CONCAT(dname,_probe)), \ Index: src/sys/dev/ata/chipsets/ata-acard.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-acard.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-acard.c --- src/sys/dev/ata/chipsets/ata-acard.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-acard.c 16 Dec 2008 05:52:51 -0000 @@ -78,7 +78,8 @@ ata_acard_probe(device_t dev) { ATA_ATP865R, 0, 0, 0x00, ATA_UDMA6, "ATP865R" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_ACARD_ID) + if (pci_get_vendor(dev) != ATA_ACARD_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -86,7 +87,7 @@ ata_acard_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_acard_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-acerlabs.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-acerlabs.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-acerlabs.c --- src/sys/dev/ata/chipsets/ata-acerlabs.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-acerlabs.c 16 Dec 2008 05:52:51 -0000 @@ -83,7 +83,8 @@ ata_ali_probe(device_t dev) { ATA_ALI_5229, 0x00, 0, ALI_OLD, ATA_WDMA2, "M5229" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_ACER_LABS_ID) + if (pci_get_vendor(dev) != ATA_ACER_LABS_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -91,7 +92,7 @@ ata_ali_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_ali_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-adaptec.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-adaptec.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-adaptec.c --- src/sys/dev/ata/chipsets/ata-adaptec.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-adaptec.c 16 Dec 2008 05:52:51 -0000 @@ -66,7 +66,8 @@ ata_adaptec_probe(device_t dev) {{ ATA_ADAPTEC_1420, 0, 4, MV_60XX, ATA_SA300, "1420SA" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_ADAPTEC_ID) + if (pci_get_vendor(dev) != ATA_ADAPTEC_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -74,8 +75,7 @@ ata_adaptec_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_marvell_edma_chipinit; - - return 0; + return ATA_PROBE_OK; } ATA_DECLARE_DRIVER(ata_adaptec); Index: src/sys/dev/ata/chipsets/ata-ahci.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-ahci.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-ahci.c --- src/sys/dev/ata/chipsets/ata-ahci.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-ahci.c 16 Dec 2008 05:52:51 -0000 @@ -72,8 +72,8 @@ ata_ahci_probe(device_t dev) struct ata_pci_controller *ctlr = device_get_softc(dev); char buffer[64]; - /* is this a possible AHCI candidate ? */ - if (pci_get_subclass(dev) != PCIS_STORAGE_SATA) + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_SATA) return ENXIO; /* is this PCI device flagged as an AHCI compliant chip ? */ @@ -87,7 +87,7 @@ ata_ahci_probe(device_t dev) sprintf(buffer, "%s AHCI controller", ata_pcivendor2str(dev)); device_set_desc_copy(dev, buffer); ctlr->chipinit = ata_ahci_chipinit; - return 0; + return ATA_PROBE_OK; } int Index: src/sys/dev/ata/chipsets/ata-amd.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-amd.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-amd.c --- src/sys/dev/ata/chipsets/ata-amd.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-amd.c 16 Dec 2008 05:52:51 -0000 @@ -75,7 +75,8 @@ ata_amd_probe(device_t dev) { ATA_AMD5536, 0x00, 0x00, 0, ATA_UDMA5, "CS5536" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_AMD_ID) + if (pci_get_vendor(dev) != ATA_AMD_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -83,7 +84,7 @@ ata_amd_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_amd_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-ati.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-ati.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-ati.c --- src/sys/dev/ata/chipsets/ata-ati.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-ati.c 16 Dec 2008 05:52:51 -0000 @@ -83,7 +83,8 @@ ata_ati_probe(device_t dev) { ATA_ATI_IXP700_S1, 0x00, ATI_AHCI, 0, ATA_SA300, "IXP700" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_ATI_ID) + if (pci_get_vendor(dev) != ATA_ATI_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -108,7 +109,7 @@ ata_ati_probe(device_t dev) ctlr->chipinit = ata_ahci_chipinit; break; } - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-cenatek.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-cenatek.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-cenatek.c --- src/sys/dev/ata/chipsets/ata-cenatek.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-cenatek.c 16 Dec 2008 05:52:51 -0000 @@ -64,12 +64,16 @@ ata_cenatek_probe(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_IDE) + return ENXIO; + if (pci_get_devid(dev) != ATA_CENATEK_ROCKET) return ENXIO; ctlr->chipinit = ata_cenatek_chipinit; device_set_desc(dev, "Cenatek Rocket Drive controller"); - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-cypress.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-cypress.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-cypress.c --- src/sys/dev/ata/chipsets/ata-cypress.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-cypress.c 16 Dec 2008 05:52:51 -0000 @@ -64,6 +64,10 @@ ata_cypress_probe(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_IDE) + return ENXIO; + /* * the Cypress chip is a mess, it contains two ATA functions, but * both channels are visible on the first one. @@ -72,11 +76,10 @@ ata_cypress_probe(device_t dev) * doesn't work with the crappy ATA interrupt setup on the alpha. */ if (pci_get_devid(dev) == ATA_CYPRESS_82C693 && - pci_get_function(dev) == 1 && - pci_get_subclass(dev) == PCIS_STORAGE_IDE) { + pci_get_function(dev) == 1) { device_set_desc(dev, "Cypress 82C693 ATA controller"); ctlr->chipinit = ata_cypress_chipinit; - return 0; + return ATA_PROBE_OK; } return ENXIO; } Index: src/sys/dev/ata/chipsets/ata-cyrix.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-cyrix.c,v retrieving revision 1.2 diff -u -p -r1.2 ata-cyrix.c --- src/sys/dev/ata/chipsets/ata-cyrix.c 17 Oct 2008 16:03:37 -0000 1.2 +++ src/sys/dev/ata/chipsets/ata-cyrix.c 16 Dec 2008 05:52:51 -0000 @@ -64,10 +64,14 @@ ata_cyrix_probe(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_IDE) + return ENXIO; + if (pci_get_devid(dev) == ATA_CYRIX_5530) { device_set_desc(dev, "Cyrix 5530 ATA33 controller"); ctlr->chipinit = ata_cyrix_chipinit; - return 0; + return ATA_PROBE_OK; } return ENXIO; } Index: src/sys/dev/ata/chipsets/ata-highpoint.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-highpoint.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-highpoint.c --- src/sys/dev/ata/chipsets/ata-highpoint.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-highpoint.c 16 Dec 2008 05:52:51 -0000 @@ -86,6 +86,10 @@ ata_highpoint_probe(device_t dev) { 0, 0, 0, 0, 0, 0}}; char buffer[64]; + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_IDE) + return ENXIO; + if (pci_get_vendor(dev) != ATA_HIGHPOINT_ID) return ENXIO; @@ -104,7 +108,7 @@ ata_highpoint_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_highpoint_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-intel.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-intel.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-intel.c --- src/sys/dev/ata/chipsets/ata-intel.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-intel.c 16 Dec 2008 05:52:51 -0000 @@ -137,7 +137,8 @@ ata_intel_probe(device_t dev) { ATA_I31244, 0, 0, 2, ATA_SA150, "31244" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_INTEL_ID) + if (pci_get_vendor(dev) != ATA_INTEL_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -145,7 +146,7 @@ ata_intel_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_intel_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-ite.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-ite.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-ite.c --- src/sys/dev/ata/chipsets/ata-ite.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-ite.c 16 Dec 2008 05:52:51 -0000 @@ -70,6 +70,10 @@ ata_ite_probe(device_t dev) { ATA_IT8211F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8211F" }, { 0, 0, 0, 0, 0, 0}}; + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_IDE) + return ENXIO; + if (pci_get_vendor(dev) != ATA_ITE_ID) return ENXIO; @@ -78,7 +82,7 @@ ata_ite_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_ite_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-jmicron.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-jmicron.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-jmicron.c --- src/sys/dev/ata/chipsets/ata-jmicron.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-jmicron.c 16 Dec 2008 05:52:51 -0000 @@ -77,7 +77,8 @@ ata_jmicron_probe(device_t dev) { 0, 0, 0, 0, 0, 0}}; char buffer[64]; - if (pci_get_vendor(dev) != ATA_JMICRON_ID) + if (pci_get_vendor(dev) != ATA_JMICRON_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(idx = ata_match_chip(dev, ids))) @@ -93,7 +94,7 @@ ata_jmicron_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_jmicron_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-marvell.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-marvell.c,v retrieving revision 1.3 diff -u -p -r1.3 ata-marvell.c --- src/sys/dev/ata/chipsets/ata-marvell.c 25 Nov 2008 00:39:03 -0000 1.3 +++ src/sys/dev/ata/chipsets/ata-marvell.c 16 Dec 2008 05:52:51 -0000 @@ -107,7 +107,8 @@ ata_marvell_probe(device_t dev) { ATA_M88SX6145, 0, 2, MV_61XX, ATA_UDMA6, "88SX6145" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_MARVELL_ID) + if (pci_get_vendor(dev) != ATA_MARVELL_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -124,7 +125,7 @@ ata_marvell_probe(device_t dev) ctlr->chipinit = ata_marvell_pata_chipinit; break; } - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-micron.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-micron.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-micron.c --- src/sys/dev/ata/chipsets/ata-micron.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-micron.c 16 Dec 2008 05:52:51 -0000 @@ -64,12 +64,16 @@ ata_micron_probe(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_IDE) + return ENXIO; + if (pci_get_devid(dev) == ATA_MICRON_RZ1000 || pci_get_devid(dev) == ATA_MICRON_RZ1001) { device_set_desc(dev, "RZ 100? ATA controller !WARNING! data loss/corruption risk"); ctlr->chipinit = ata_micron_chipinit; - return 0; + return ATA_PROBE_OK; } else return ENXIO; Index: src/sys/dev/ata/chipsets/ata-national.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-national.c,v retrieving revision 1.2 diff -u -p -r1.2 ata-national.c --- src/sys/dev/ata/chipsets/ata-national.c 17 Oct 2008 16:03:37 -0000 1.2 +++ src/sys/dev/ata/chipsets/ata-national.c 16 Dec 2008 05:52:51 -0000 @@ -64,11 +64,15 @@ ata_national_probe(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_IDE) + return ENXIO; + /* this chip is a clone of the Cyrix chip, bugs and all */ if (pci_get_devid(dev) == ATA_SC1100) { device_set_desc(dev, "National Geode SC1100 ATA33 controller"); ctlr->chipinit = ata_national_chipinit; - return 0; + return ATA_PROBE_OK; } return ENXIO; } Index: src/sys/dev/ata/chipsets/ata-netcell.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-netcell.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-netcell.c --- src/sys/dev/ata/chipsets/ata-netcell.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-netcell.c 16 Dec 2008 05:52:51 -0000 @@ -65,10 +65,14 @@ ata_netcell_probe(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(dev); + if (pci_get_class(dev) != PCIC_STORAGE || + pci_get_subclass(dev) != PCIS_STORAGE_IDE) + return ENXIO; + if (pci_get_devid(dev) == ATA_NETCELL_SR) { device_set_desc(dev, "Netcell SyncRAID SR3000/5000 RAID Controller"); ctlr->chipinit = ata_netcell_chipinit; - return 0; + return ATA_PROBE_OK; } return ENXIO; } Index: src/sys/dev/ata/chipsets/ata-nvidia.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-nvidia.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-nvidia.c --- src/sys/dev/ata/chipsets/ata-nvidia.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-nvidia.c 16 Dec 2008 05:52:51 -0000 @@ -101,7 +101,8 @@ ata_nvidia_probe(device_t dev) { ATA_NFORCE_MCP77, 0, 0, 0, ATA_UDMA6, "nForce MCP77" }, { 0, 0, 0, 0, 0, 0}} ; - if (pci_get_vendor(dev) != ATA_NVIDIA_ID) + if (pci_get_vendor(dev) != ATA_NVIDIA_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -109,7 +110,7 @@ ata_nvidia_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_nvidia_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-promise.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-promise.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-promise.c --- src/sys/dev/ata/chipsets/ata-promise.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-promise.c 16 Dec 2008 05:52:51 -0000 @@ -171,7 +171,8 @@ ata_promise_probe(device_t dev) char buffer[64]; uintptr_t devid = 0; - if (pci_get_vendor(dev) != ATA_PROMISE_ID) + if (pci_get_vendor(dev) != ATA_PROMISE_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(idx = ata_match_chip(dev, ids))) @@ -210,7 +211,7 @@ ata_promise_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_promise_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-serverworks.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-serverworks.c,v retrieving revision 1.2 diff -u -p -r1.2 ata-serverworks.c --- src/sys/dev/ata/chipsets/ata-serverworks.c 17 Oct 2008 16:03:37 -0000 1.2 +++ src/sys/dev/ata/chipsets/ata-serverworks.c 16 Dec 2008 05:52:51 -0000 @@ -86,7 +86,8 @@ ata_serverworks_probe(device_t dev) { ATA_FRODO8, 0x00, SWKS_MIO, 8, ATA_SA150, "Frodo8" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_SERVERWORKS_ID) + if (pci_get_vendor(dev) != ATA_SERVERWORKS_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -94,7 +95,7 @@ ata_serverworks_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_serverworks_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-siliconimage.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-siliconimage.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-siliconimage.c --- src/sys/dev/ata/chipsets/ata-siliconimage.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-siliconimage.c 16 Dec 2008 05:52:51 -0000 @@ -104,7 +104,8 @@ ata_sii_probe(device_t dev) { ATA_CMD646, 0x00, 0, 0, ATA_WDMA2, "(CMD) 646" }, { 0, 0, 0, 0, 0, 0}}; - if (pci_get_vendor(dev) != ATA_SILICON_IMAGE_ID) + if (pci_get_vendor(dev) != ATA_SILICON_IMAGE_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(ctlr->chip = ata_match_chip(dev, ids))) @@ -112,7 +113,7 @@ ata_sii_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_sii_chipinit; - return 0; + return ATA_PROBE_OK; } int Index: src/sys/dev/ata/chipsets/ata-sis.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-sis.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-sis.c --- src/sys/dev/ata/chipsets/ata-sis.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-sis.c 16 Dec 2008 05:52:51 -0000 @@ -105,7 +105,8 @@ ata_sis_probe(device_t dev) char buffer[64]; int found = 0; - if (pci_get_vendor(dev) != ATA_SIS_ID) + if (pci_get_vendor(dev) != ATA_SIS_ID || + pci_get_class(dev) != PCIC_STORAGE) return ENXIO; if (!(idx = ata_find_chip(dev, ids, -pci_get_slot(dev)))) @@ -152,7 +153,7 @@ ata_sis_probe(device_t dev) device_set_desc_copy(dev, buffer); ctlr->chip = idx; ctlr->chipinit = ata_sis_chipinit; - return 0; + return ATA_PROBE_OK; } static int Index: src/sys/dev/ata/chipsets/ata-via.c =================================================================== RCS file: /ncvs/src/sys/dev/ata/chipsets/ata-via.c,v retrieving revision 1.1 diff -u -p -r1.1 ata-via.c --- src/sys/dev/ata/chipsets/ata-via.c 9 Oct 2008 12:56:57 -0000 1.1 +++ src/sys/dev/ata/chipsets/ata-via.c 16 Dec 2008 05:52:51 -0000 @@ -105,7 +105,10 @@ ata_via_probe(device_t dev) { ATA_VIA8251, 0x00, 0, VIAAHCI, ATA_SA300, "8251" }, { 0, 0, 0, 0, 0, 0 }}; - if (pci_get_vendor(dev) != ATA_VIA_ID) + if (pci_get_vendor(dev) != ATA_VIA_ID || + pci_get_class(dev) != PCIC_STORAGE) + return ENXIO; + return ENXIO; if (pci_get_devid(dev) == ATA_VIA82C571) { @@ -119,7 +122,7 @@ ata_via_probe(device_t dev) ata_set_desc(dev); ctlr->chipinit = ata_via_chipinit; - return 0; + return ATA_PROBE_OK; } static int