Re: Silicon Image Sil 3112 SATARaid Controller

From: Matthew Dillon <dillon_at_apollo.backplane.com>
Date: Thu, 11 Mar 2004 20:47:12 -0800 (PST)
    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
_at__at_ -26,7 +26,7 _at__at_
  * 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>
_at__at_ -224,6 +224,12 _at__at_
 	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";
 
_at__at_ -726,7 +732,7 _at__at_
 					 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
_at__at_ -26,7 +26,7 _at__at_
  * 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>
_at__at_ -702,6 +702,10 _at__at_
 	/* 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);
Received on Thu Mar 11 2004 - 19:47:16 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:47 UTC