Author: mav
Date: Mon Nov 23 18:07:28 2009
New Revision: 199717
URL: http://svn.freebsd.org/changeset/base/199717

Log:
  Do not attach JMicrons with single PCI function. They are not working as
  AHCI for some reason, even when declaring so. Let atajmicron configure
  them for us and provide PATA support.

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

Modified: head/sys/dev/ahci/ahci.c
==============================================================================
--- head/sys/dev/ahci/ahci.c    Mon Nov 23 17:54:57 2009        (r199716)
+++ head/sys/dev/ahci/ahci.c    Mon Nov 23 18:07:28 2009        (r199717)
@@ -254,6 +254,10 @@ ahci_probe(device_t dev)
        for (i = 0; ahci_ids[i].id != 0; i++) {
                if (ahci_ids[i].id == devid &&
                    (valid || !(ahci_ids[i].quirks & AHCI_Q_NOFORCE))) {
+                       /* Do not attach JMicrons with single PCI function. */
+                       if (pci_get_vendor(dev) == 0x197b &&
+                           (pci_read_config(dev, 0xdf, 1) & 0x40) == 0)
+                               return (ENXIO);
                        snprintf(buf, sizeof(buf), "%s AHCI SATA controller",
                            ahci_ids[i].name);
                        device_set_desc_copy(dev, buf);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to