[RELENG_6] ATARAID oddity

Sean Bruno sbruno at miralink.com
Tue Sep 23 16:48:27 UTC 2008


Søren Schmidt wrote:
> Hi
>
> Just the short version:
>
> Since this is softraids and the different vendors use different chips, 
> there is no 1 to 1 relation between raid type and controller PCI id. 
> Its a puzzle you cannot solve without loosing a good percentage of the 
> systems out there.
>
> -Søren
>
Agreed.  It is very easy to lose systems where the host raid 
configurations are working. 

In order to make it easier, I looked over at Heinz's Linux dmraid app. 
http://people.redhat.com/~heinzm/sw/dmraid/src/

In the Adaptec format, he is looking at PCI ID  0x9005 .  The code 
apparently used to
look at 0x9004 as well, but that is commented out at this time.

0x1044 is actually the old dpt() driver PCI ID, so that was completely 
wrong.  I have one of
these RAID controllers, and I find it interesting that they use the same 
RAID metadata.

Sean



-------------- next part --------------
Index: ata-pci.c
===================================================================
--- ata-pci.c	(revision 5956)
+++ ata-pci.c	(working copy)
@@ -532,6 +532,7 @@
     switch (pci_get_vendor(dev)) {
     case ATA_ACARD_ID:          return "Acard";
     case ATA_ACER_LABS_ID:      return "AcerLabs";
+    case ATA_ADAPTEC_ID:        return "Adaptec";
     case ATA_AMD_ID:            return "AMD";
     case ATA_ATI_ID:            return "ATI";
     case ATA_CYRIX_ID:          return "Cyrix";
Index: ata-raid.c
===================================================================
--- ata-raid.c	(revision 5956)
+++ ata-raid.c	(working copy)
@@ -1304,6 +1304,12 @@
     /* prioritize vendor native metadata layout if possible */
     if (devclass == pci_devclass) {
 	switch (pci_get_vendor(GRANDPARENT(device_get_parent(subdisk)))) {
+	/* Adaptec HostRAID */
+	case ATA_ADAPTEC_ID:
+	    if (ata_raid_adaptec_read_meta(subdisk, ata_raid_arrays))
+		return 0;
+	    break;
+
 	case ATA_HIGHPOINT_ID: 
 	    if (ata_raid_hptv3_read_meta(subdisk, ata_raid_arrays))
 		return 0;
@@ -1358,10 +1364,6 @@
     /* handle controllers that have multiple layout possibilities */
     /* NOTE: the order of these are not insignificant */
 
-    /* Adaptec HostRAID */
-    if (ata_raid_adaptec_read_meta(subdisk, ata_raid_arrays))
-	return 0;
-
     /* LSILogic v3 and v2 */
     if (ata_raid_lsiv3_read_meta(subdisk, ata_raid_arrays))
 	return 0;
Index: ata-pci.h
===================================================================
--- ata-pci.h	(revision 5956)
+++ ata-pci.h	(working copy)
@@ -71,6 +71,8 @@
 };
 
 /* defines for known chipset PCI id's */
+#define ATA_ADAPTEC_ID		0x9005
+
 #define ATA_ACARD_ID            0x1191
 #define ATA_ATP850              0x00021191
 #define ATA_ATP850A             0x00041191


More information about the freebsd-drivers mailing list