Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2009 18:07:28 +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: r199717 - head/sys/dev/ahci
Message-ID:  <200911231807.nANI7SPN064457@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



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