Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Apr 2009 21:34:15 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191600 - in head/sys/dev/ata: . chipsets
Message-ID:  <200904272134.n3RLYFGr027482@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Mon Apr 27 21:34:15 2009
New Revision: 191600
URL: http://svn.freebsd.org/changeset/base/191600

Log:
  - Give generic AHCI driver lower priority than device-specific drivers.
  - Consistently use BUS_PROBE_GENERIC instead of -100.

Modified:
  head/sys/dev/ata/ata-pci.c
  head/sys/dev/ata/chipsets/ata-ahci.c

Modified: head/sys/dev/ata/ata-pci.c
==============================================================================
--- head/sys/dev/ata/ata-pci.c	Mon Apr 27 21:04:16 2009	(r191599)
+++ head/sys/dev/ata/ata-pci.c	Mon Apr 27 21:34:15 2009	(r191600)
@@ -70,18 +70,18 @@ ata_pci_probe(device_t dev)
 
     /* is this a storage class device ? */
     if (pci_get_class(dev) != PCIC_STORAGE)
-	return ENXIO;
+	return (ENXIO);
 
     /* is this an IDE/ATA type device ? */
     if (pci_get_subclass(dev) != PCIS_STORAGE_IDE)
-	return ENXIO;
+	return (ENXIO);
     
     sprintf(buffer, "%s ATA controller", ata_pcivendor2str(dev));
     device_set_desc_copy(dev, buffer);
     ctlr->chipinit = ata_generic_chipinit;
 
     /* we are a low priority handler */
-    return -100;
+    return (BUS_PROBE_GENERIC);
 }
 
 int

Modified: head/sys/dev/ata/chipsets/ata-ahci.c
==============================================================================
--- head/sys/dev/ata/chipsets/ata-ahci.c	Mon Apr 27 21:04:16 2009	(r191599)
+++ head/sys/dev/ata/chipsets/ata-ahci.c	Mon Apr 27 21:34:15 2009	(r191600)
@@ -85,7 +85,7 @@ ata_ahci_probe(device_t dev)
 
     /* is this PCI device flagged as an AHCI compliant chip ? */
     if (pci_read_config(dev, PCIR_PROGIF, 1) != PCIP_STORAGE_SATA_AHCI_1_0)
-	return ENXIO;
+	return (ENXIO);
 
     if (bootverbose)
 	sprintf(buffer, "%s (ID=%08x) AHCI controller", 
@@ -94,7 +94,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 (BUS_PROBE_GENERIC);
 }
 
 int



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904272134.n3RLYFGr027482>