svn commit: r192033 - stable/7/sys/dev/ata

Alexander Motin mav at FreeBSD.org
Wed May 13 02:55:22 UTC 2009


Author: mav
Date: Wed May 13 02:55:21 2009
New Revision: 192033
URL: http://svn.freebsd.org/changeset/base/192033

Log:
  Make vendor-specific drivers prefered over the generic AHCI one.
  This fixes some controllers, like JMicron ones, which provide also PATA via
  PCI function that declared as AHCI controller.
  
  This is not an MFC, but the same was already done in 8-CURRENT in other way.
  
  PR:		kern/132082

Modified:
  stable/7/sys/dev/ata/ata-pci.c

Modified: stable/7/sys/dev/ata/ata-pci.c
==============================================================================
--- stable/7/sys/dev/ata/ata-pci.c	Wed May 13 02:26:34 2009	(r192032)
+++ stable/7/sys/dev/ata/ata-pci.c	Wed May 13 02:55:21 2009	(r192033)
@@ -76,12 +76,6 @@ ata_pci_probe(device_t dev)
     if (pci_get_class(dev) != PCIC_STORAGE)
 	return ENXIO;
 
-    /* if this is an AHCI chipset grab it */
-    if (pci_get_subclass(dev) == PCIS_STORAGE_SATA) {
-	if (!ata_ahci_ident(dev))
-	    return ATA_PROBE_OK;
-    }
-
     /* run through the vendor specific drivers */
     switch (pci_get_vendor(dev)) {
     case ATA_ACARD_ID: 
@@ -178,6 +172,12 @@ ata_pci_probe(device_t dev)
 	break;
     }
 
+    /* if this is an AHCI chipset grab it */
+    if (pci_get_subclass(dev) == PCIS_STORAGE_SATA) {
+	if (!ata_ahci_ident(dev))
+	    return ATA_PROBE_OK;
+    }
+
     /* unknown chipset, try generic DMA if it seems possible */
     if (pci_get_subclass(dev) == PCIS_STORAGE_IDE) {
 	if (!ata_generic_ident(dev))


More information about the svn-src-stable-7 mailing list