Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Mar 2004 20:47:12 -0800 (PST)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        Julian Elischer <julian@elischer.org>
Cc:        Putinas Piliponis <putinas.piliponis@icnspot.net>
Subject:   Re: Silicon Image Sil 3112 SATARaid Controller
Message-ID:  <200403120447.i2C4lCQP039033@apollo.backplane.com>
References:  <20040311232539.D701C43D1F@mx1.FreeBSD.org> <p0600207cbc76a71fc640@[10.0.1.4]> <005701c407c6$c2dd7970$1e64a8c0@spotripoli.local> <p0600207dbc76b399b2f6@[10.0.1.4]><40510F5C.3000400@elischer.org>

next in thread | previous in thread | raw e-mail | index | archive | help
    The Silicon Image Sil 3112 should be trivially supportable under
    4.x.  Actually, any of the Sil 3xxx controllers should be trivially
    supportable.

    This patch is for the 3512 and the 3114, and its based on DragonFly,
    so it won't patch cleanly into 4.x, but it's so simple that you should
    be able to adapt it to 4.x for the 3112 by entering the correct PCI IDs
    (from pciconf -l).

    This is admittedly a hack, but it seems to work well with my Sil 3512
    even though it does not report the correct speed or type (but still
    operates at the correct speed).

    (There's also an unrelated rman fix in there which may or may not already
    be fixed in 4.x).

						-Matt


Index: ata-pci.c
===================================================================
RCS file: /cvs/src/sys/dev/disk/ata/ata-pci.c,v
retrieving revision 1.10
retrieving revision 1.13
diff -u -r1.10 -r1.13
--- ata-pci.c	18 Feb 2004 04:08:49 -0000	1.10
+++ ata-pci.c	2 Mar 2004 21:03:46 -0000	1.13
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ata/ata-pci.c,v 1.32.2.15 2003/06/06 13:27:05 fjoe Exp $
- * $DragonFly: src/sys/dev/disk/ata/ata-pci.c,v 1.10 2004/02/18 04:08:49 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/ata/ata-pci.c,v 1.13 2004/03/02 21:03:46 drhodus Exp $
  */
 
 #include <sys/param.h>
@@ -224,6 +224,12 @@
 	else
 	    return "SiS 5591 ATA33 controller";
 
+    case 0x35121095:
+	return "SiI 3512 SATA controller";
+
+    case 0x31141095:
+	return "SiI 3114 SATA controller";
+
     case 0x06801095:
 	return "SiI 0680 ATA133 controller";
 
@@ -726,7 +732,7 @@
 					 start, end, count, flags);
 		if (res) {
 			start = rman_get_start(res) + 2;
-			end = rman_get_start(res) + ATA_ALTIOSIZE - 1;
+			end = start + ATA_ALTIOSIZE - 1;
 			count = ATA_ALTIOSIZE;
 			BUS_RELEASE_RESOURCE(device_get_parent(dev), dev,
 					     SYS_RES_IOPORT, myrid, res);
Index: ata-dma.c
===================================================================
RCS file: /cvs/src/sys/dev/disk/ata/ata-dma.c,v
retrieving revision 1.15
retrieving revision 1.18
diff -u -r1.15 -r1.18
--- ata-dma.c	18 Feb 2004 04:08:49 -0000	1.15
+++ ata-dma.c	2 Mar 2004 21:03:46 -0000	1.18
@@ -26,7 +26,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/dev/ata/ata-dma.c,v 1.35.2.31 2003/05/07 16:46:11 jhb Exp $
- * $DragonFly: src/sys/dev/disk/ata/ata-dma.c,v 1.15 2004/02/18 04:08:49 dillon Exp $
+ * $DragonFly: src/sys/dev/disk/ata/ata-dma.c,v 1.18 2004/03/02 21:03:46 drhodus Exp $
  */
 
 #include <sys/param.h>
@@ -702,6 +702,10 @@
 	/* we could set PIO mode timings, but we assume the BIOS did that */
 	break;
 
+    case 0x35121095:	/* SiI 3512 SATA controller */
+	/* EXPERIMENTAL!  Works with FN85 AMD 64 3200+ motherboard */
+	/* FALLTHROUGH */
+    case 0x31141095:	/* SiI 3114 SATA controller */
     case 0x06801095:	/* SiI 0680 ATA133 controller */
 	{
 	    u_int8_t ureg = 0xac + (device * 0x02) + (channel * 0x10);



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