summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2008-12-18 21:13:46 +0000
committermav <mav@FreeBSD.org>2008-12-18 21:13:46 +0000
commit3b6abee3bbd82374d026f0be166d1fd13301fc3b (patch)
tree6ff6c35c41907b98ad0c91b0834f7e1ece28d194 /sys/dev/ata
parent3e6eb1349aa2d4042cfe04de322859f7083018f9 (diff)
downloadFreeBSD-src-3b6abee3bbd82374d026f0be166d1fd13301fc3b.zip
FreeBSD-src-3b6abee3bbd82374d026f0be166d1fd13301fc3b.tar.gz
Before modularization commit, atapci driver was attaching only to devices of
storage class. This check was lost. It is not important for the most cases, but as it was reported on current@, it does important for sis driver and surely inportant for AHCI driver. So restore it there. Submitted by: Toshikazu ICHINOSEKI, Andrey V. Elsukov Discussed on: current@
Diffstat (limited to 'sys/dev/ata')
-rw-r--r--sys/dev/ata/chipsets/ata-ahci.c5
-rw-r--r--sys/dev/ata/chipsets/ata-sis.c3
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ata/chipsets/ata-ahci.c b/sys/dev/ata/chipsets/ata-ahci.c
index 2b87c96..4028466 100644
--- a/sys/dev/ata/chipsets/ata-ahci.c
+++ b/sys/dev/ata/chipsets/ata-ahci.c
@@ -73,8 +73,9 @@ ata_ahci_probe(device_t dev)
char buffer[64];
/* is this a possible AHCI candidate ? */
- if (pci_get_subclass(dev) != PCIS_STORAGE_SATA)
- return ENXIO;
+ 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 ? */
if (pci_read_config(dev, PCIR_PROGIF, 1) != PCIP_STORAGE_SATA_AHCI_1_0)
diff --git a/sys/dev/ata/chipsets/ata-sis.c b/sys/dev/ata/chipsets/ata-sis.c
index e94bef5..56b194d 100644
--- a/sys/dev/ata/chipsets/ata-sis.c
+++ b/sys/dev/ata/chipsets/ata-sis.c
@@ -105,6 +105,9 @@ ata_sis_probe(device_t dev)
char buffer[64];
int found = 0;
+ if (pci_get_class(dev) != PCIC_STORAGE)
+ return (ENXIO);
+
if (pci_get_vendor(dev) != ATA_SIS_ID)
return ENXIO;
OpenPOWER on IntegriCloud