Print this page
5719 Add support for LSI Fury adapters

@@ -19,10 +19,13 @@
  * This module contains functions for device drivers
  * to get pd-ld mapping information.
  *
  * **********************************************************************
  */
+/*
+ * Copyright 2015 Garrett D'Amore <garrett@damore.org>
+ */
 
 #include <sys/scsi/scsi.h>
 #include "mr_sas.h"
 #include "ld_pd_map.h"
 

@@ -207,10 +210,11 @@
         int             error_code = 0;
         U8              retval = TRUE;
         U32             rowMod;
         U32             armQ;
         U32             arm;
+        U16             devid = instance->device_id;
 
         ASSERT(raid->rowDataSize != 0);
 
         row = (stripRow / raid->rowDataSize);
 

@@ -249,12 +253,13 @@
         if (pd != MR_PD_INVALID) {
                 *pDevHandle     = MR_PdDevHandleGet(pd, map);
         } else {
                 *pDevHandle = MR_PD_INVALID; /* set dev handle as invalid. */
                 if ((raid->level >= 5) &&
-                    ((instance->device_id != PCI_DEVICE_ID_LSI_INVADER) ||
-                    (instance->device_id == PCI_DEVICE_ID_LSI_INVADER &&
+                    ((devid != PCI_DEVICE_ID_LSI_INVADER) ||
+                    ((devid == PCI_DEVICE_ID_LSI_INVADER ||
+                    (devid == PCI_DEVICE_ID_LSI_FURY)) &&
                     raid->regTypeReqOnRead != REGION_TYPE_UNUSED))) {
                         pRAID_Context->regLockFlags = REGION_TYPE_EXCLUSIVE;
                 } else if (raid->level == 1) {
                         /* Get Alternate Pd. */
                         pd = MR_ArPdGet(arRef, physArm + 1, map);

@@ -396,11 +401,12 @@
                 }
         }
 
         pRAID_Context->timeoutValue = map->raidMap.fpPdIoTimeoutSec;
 
-        if (instance->device_id == PCI_DEVICE_ID_LSI_INVADER) {
+        if ((instance->device_id == PCI_DEVICE_ID_LSI_INVADER) ||
+            (instance->device_id == PCI_DEVICE_ID_LSI_FURY)) {
                 pRAID_Context->regLockFlags = (isRead) ?
                     raid->regTypeReqOnRead : raid->regTypeReqOnWrite;
         } else {
                 pRAID_Context->regLockFlags = (isRead) ?
                     REGION_TYPE_SHARED_READ : raid->regTypeReqOnWrite;