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 <amdm...@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);
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to