Print this page
5719 Add support for LSI Fury adapters
*** 19,28 ****
--- 19,31 ----
* 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,216 ****
--- 210,220 ----
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,260 ****
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 &&
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);
--- 253,265 ----
if (pd != MR_PD_INVALID) {
*pDevHandle = MR_PdDevHandleGet(pd, map);
} else {
*pDevHandle = MR_PD_INVALID; /* set dev handle as invalid. */
if ((raid->level >= 5) &&
! ((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,406 ****
}
}
pRAID_Context->timeoutValue = map->raidMap.fpPdIoTimeoutSec;
! if (instance->device_id == PCI_DEVICE_ID_LSI_INVADER) {
pRAID_Context->regLockFlags = (isRead) ?
raid->regTypeReqOnRead : raid->regTypeReqOnWrite;
} else {
pRAID_Context->regLockFlags = (isRead) ?
REGION_TYPE_SHARED_READ : raid->regTypeReqOnWrite;
--- 401,412 ----
}
}
pRAID_Context->timeoutValue = map->raidMap.fpPdIoTimeoutSec;
! 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;