Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 2015 15:06:27 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288111 - head/sys/dev/ahci
Message-ID:  <201509221506.t8MF6RaE089141@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Tue Sep 22 15:06:26 2015
New Revision: 288111
URL: https://svnweb.freebsd.org/changeset/base/288111

Log:
  Allow AHCI driver attach to all known chips reporting RAID class.
  
  Reported by:	Michael BlackHeart <amdmiek@gmail.com>
  MFC after:	1 week

Modified:
  head/sys/dev/ahci/ahci_pci.c

Modified: head/sys/dev/ahci/ahci_pci.c
==============================================================================
--- head/sys/dev/ahci/ahci_pci.c	Tue Sep 22 14:55:46 2015	(r288110)
+++ head/sys/dev/ahci/ahci_pci.c	Tue Sep 22 15:06:26 2015	(r288111)
@@ -327,6 +327,9 @@ ahci_probe(device_t dev)
 	    pci_get_subclass(dev) == PCIS_STORAGE_SATA &&
 	    pci_get_progif(dev) == PCIP_STORAGE_SATA_AHCI_1_0)
 		valid = 1;
+	else if (pci_get_class(dev) == PCIC_STORAGE &&
+	    pci_get_subclass(dev) == PCIS_STORAGE_RAID)
+		valid = 2;
 	/* Is this a known AHCI chip? */
 	for (i = 0; ahci_ids[i].id != 0; i++) {
 		if (ahci_ids[i].id == devid &&
@@ -343,7 +346,7 @@ ahci_probe(device_t dev)
 			return (BUS_PROBE_DEFAULT);
 		}
 	}
-	if (!valid)
+	if (valid != 1)
 		return (ENXIO);
 	device_set_desc_copy(dev, "AHCI SATA controller");
 	return (BUS_PROBE_DEFAULT);



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