Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Oct 2009 16:12:09 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r198334 - in stable/7/sys: . contrib/pf dev/ata
Message-ID:  <200910211612.n9LGC9Av004111@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Wed Oct 21 16:12:09 2009
New Revision: 198334
URL: http://svn.freebsd.org/changeset/base/198334

Log:
  MFC rev. 178375:
  Add HW level support for the Adaptec 1420SA controller.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ata/ata-chipset.c
  stable/7/sys/dev/ata/ata-pci.c
  stable/7/sys/dev/ata/ata-pci.h

Modified: stable/7/sys/dev/ata/ata-chipset.c
==============================================================================
--- stable/7/sys/dev/ata/ata-chipset.c	Wed Oct 21 15:57:16 2009	(r198333)
+++ stable/7/sys/dev/ata/ata-chipset.c	Wed Oct 21 16:12:09 2009	(r198334)
@@ -1358,6 +1358,27 @@ ata_amd_chipinit(device_t dev)
 
 
 /*
+ * Adaptec chipset support functions
+ */
+int
+ata_adaptec_ident(device_t dev)
+{
+    struct ata_pci_controller *ctlr = device_get_softc(dev);
+    static struct ata_chip_id ids[] =
+    {{ ATA_ADAPTEC_1420, 0, 4, MV60XX, ATA_SA300, "1420SA" },
+     { 0, 0, 0, 0, 0, 0}};
+
+    if (!(ctlr->chip = ata_match_chip(dev, ids)))
+	return ENXIO;
+
+    ata_set_desc(dev);
+    ctlr->chipinit = ata_marvell_edma_chipinit;
+
+    return 0;
+}
+
+
+/*
  * ATI chipset support functions
  */
 int

Modified: stable/7/sys/dev/ata/ata-pci.c
==============================================================================
--- stable/7/sys/dev/ata/ata-pci.c	Wed Oct 21 15:57:16 2009	(r198333)
+++ stable/7/sys/dev/ata/ata-pci.c	Wed Oct 21 16:12:09 2009	(r198334)
@@ -90,6 +90,10 @@ ata_pci_probe(device_t dev)
 	if (!ata_amd_ident(dev))
 	    return ATA_PROBE_OK;
 	break;
+    case ATA_ADAPTEC_ID:
+	if (!ata_adaptec_ident(dev))
+	    return ATA_PROBE_OK;
+	break;
     case ATA_ATI_ID:
 	if (!ata_ati_ident(dev))
 	    return ATA_PROBE_OK;
@@ -517,6 +521,7 @@ ata_pcivendor2str(device_t dev)
     case ATA_ACARD_ID:          return "Acard";
     case ATA_ACER_LABS_ID:      return "AcerLabs";
     case ATA_AMD_ID:            return "AMD";
+    case ATA_ADAPTEC_ID:        return "Adaptec";
     case ATA_ATI_ID:            return "ATI";
     case ATA_CYRIX_ID:          return "Cyrix";
     case ATA_CYPRESS_ID:        return "Cypress";

Modified: stable/7/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/7/sys/dev/ata/ata-pci.h	Wed Oct 21 15:57:16 2009	(r198333)
+++ stable/7/sys/dev/ata/ata-pci.h	Wed Oct 21 16:12:09 2009	(r198334)
@@ -81,6 +81,14 @@ struct ata_connect_task {
 #define ATA_ATP865A             0x00081191
 #define ATA_ATP865R             0x00091191
 
+#define ATA_ACER_LABS_ID        0x10b9
+#define ATA_ALI_1533            0x153310b9
+#define ATA_ALI_5229            0x522910b9
+#define ATA_ALI_5281            0x528110b9
+#define ATA_ALI_5287            0x528710b9
+#define ATA_ALI_5288            0x528810b9
+#define ATA_ALI_5289            0x528910b9
+
 #define ATA_AMD_ID              0x1022
 #define ATA_AMD755              0x74011022
 #define ATA_AMD756              0x74091022
@@ -89,13 +97,8 @@ struct ata_connect_task {
 #define ATA_AMD8111             0x74691022
 #define ATA_AMD5536             0x209a1022
 
-#define ATA_ACER_LABS_ID        0x10b9
-#define ATA_ALI_1533            0x153310b9
-#define ATA_ALI_5229            0x522910b9
-#define ATA_ALI_5281            0x528110b9
-#define ATA_ALI_5287            0x528710b9
-#define ATA_ALI_5288            0x528810b9
-#define ATA_ALI_5289            0x528910b9
+#define ATA_ADAPTEC_ID          0x9005
+#define ATA_ADAPTEC_1420        0x02419005
 
 #define ATA_ATI_ID              0x1002
 #define ATA_ATI_IXP200          0x43491002
@@ -511,6 +514,7 @@ int ata_ahci_ident(device_t);
 int ata_acard_ident(device_t);
 int ata_ali_ident(device_t);
 int ata_amd_ident(device_t);
+int ata_adaptec_ident(device_t);
 int ata_ati_ident(device_t);
 int ata_cyrix_ident(device_t);
 int ata_cypress_ident(device_t);



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