Commit 9581ebeb authored by Sasikumar Chandrasekaran's avatar Sasikumar Chandrasekaran Committed by Martin K. Petersen

scsi: megaraid_sas: Add the Support for SAS3.5 Generic Megaraid Controllers Capabilities

The Megaraid driver has to support the SAS3.5 Generic Megaraid Controllers Firmware functionality.
Signed-off-by: default avatarSasikumar Chandrasekaran <sasikumar.pc@broadcom.com>
Reviewed-by: default avatarTomas Henzl <thenzl@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent d889344e
...@@ -5042,34 +5042,29 @@ static int megasas_init_fw(struct megasas_instance *instance) ...@@ -5042,34 +5042,29 @@ static int megasas_init_fw(struct megasas_instance *instance)
reg_set = instance->reg_set; reg_set = instance->reg_set;
switch (instance->pdev->device) { if (fusion)
case PCI_DEVICE_ID_LSI_FUSION:
case PCI_DEVICE_ID_LSI_PLASMA:
case PCI_DEVICE_ID_LSI_INVADER:
case PCI_DEVICE_ID_LSI_FURY:
case PCI_DEVICE_ID_LSI_INTRUDER:
case PCI_DEVICE_ID_LSI_INTRUDER_24:
case PCI_DEVICE_ID_LSI_CUTLASS_52:
case PCI_DEVICE_ID_LSI_CUTLASS_53:
instance->instancet = &megasas_instance_template_fusion; instance->instancet = &megasas_instance_template_fusion;
break; else {
case PCI_DEVICE_ID_LSI_SAS1078R: switch (instance->pdev->device) {
case PCI_DEVICE_ID_LSI_SAS1078DE: case PCI_DEVICE_ID_LSI_SAS1078R:
instance->instancet = &megasas_instance_template_ppc; case PCI_DEVICE_ID_LSI_SAS1078DE:
break; instance->instancet = &megasas_instance_template_ppc;
case PCI_DEVICE_ID_LSI_SAS1078GEN2: break;
case PCI_DEVICE_ID_LSI_SAS0079GEN2: case PCI_DEVICE_ID_LSI_SAS1078GEN2:
instance->instancet = &megasas_instance_template_gen2; case PCI_DEVICE_ID_LSI_SAS0079GEN2:
break; instance->instancet = &megasas_instance_template_gen2;
case PCI_DEVICE_ID_LSI_SAS0073SKINNY: break;
case PCI_DEVICE_ID_LSI_SAS0071SKINNY: case PCI_DEVICE_ID_LSI_SAS0073SKINNY:
instance->instancet = &megasas_instance_template_skinny; case PCI_DEVICE_ID_LSI_SAS0071SKINNY:
break; instance->instancet = &megasas_instance_template_skinny;
case PCI_DEVICE_ID_LSI_SAS1064R: break;
case PCI_DEVICE_ID_DELL_PERC5: case PCI_DEVICE_ID_LSI_SAS1064R:
default: case PCI_DEVICE_ID_DELL_PERC5:
instance->instancet = &megasas_instance_template_xscale; default:
break; instance->instancet = &megasas_instance_template_xscale;
instance->pd_list_not_supported = 1;
break;
}
} }
if (megasas_transition_to_ready(instance, 0)) { if (megasas_transition_to_ready(instance, 0)) {
...@@ -5819,7 +5814,9 @@ static int megasas_probe_one(struct pci_dev *pdev, ...@@ -5819,7 +5814,9 @@ static int megasas_probe_one(struct pci_dev *pdev,
if ((instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) || if ((instance->pdev->device == PCI_DEVICE_ID_LSI_FUSION) ||
(instance->pdev->device == PCI_DEVICE_ID_LSI_PLASMA)) (instance->pdev->device == PCI_DEVICE_ID_LSI_PLASMA))
fusion->adapter_type = THUNDERBOLT_SERIES; fusion->adapter_type = THUNDERBOLT_SERIES;
else if (!instance->is_ventura) else if (instance->is_ventura)
fusion->adapter_type = VENTURA_SERIES;
else
fusion->adapter_type = INVADER_SERIES; fusion->adapter_type = INVADER_SERIES;
} }
break; break;
......
...@@ -244,7 +244,10 @@ megasas_fusion_update_can_queue(struct megasas_instance *instance, int fw_boot_c ...@@ -244,7 +244,10 @@ megasas_fusion_update_can_queue(struct megasas_instance *instance, int fw_boot_c
reg_set = instance->reg_set; reg_set = instance->reg_set;
cur_max_fw_cmds = readl(&instance->reg_set->outbound_scratch_pad_3) & 0x00FFFF; /* ventura FW does not fill outbound_scratch_pad_3 with queue depth */
if (!instance->is_ventura)
cur_max_fw_cmds =
readl(&instance->reg_set->outbound_scratch_pad_3) & 0x00FFFF;
if (dual_qdepth_disable || !cur_max_fw_cmds) if (dual_qdepth_disable || !cur_max_fw_cmds)
cur_max_fw_cmds = instance->instancet->read_fw_status_reg(reg_set) & 0x00FFFF; cur_max_fw_cmds = instance->instancet->read_fw_status_reg(reg_set) & 0x00FFFF;
...@@ -837,7 +840,7 @@ megasas_ioc_init_fusion(struct megasas_instance *instance) ...@@ -837,7 +840,7 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
drv_ops = (MFI_CAPABILITIES *) &(init_frame->driver_operations); drv_ops = (MFI_CAPABILITIES *) &(init_frame->driver_operations);
/* driver support Extended MSIX */ /* driver support Extended MSIX */
if (fusion->adapter_type == INVADER_SERIES) if (fusion->adapter_type >= INVADER_SERIES)
drv_ops->mfi_capabilities.support_additional_msix = 1; drv_ops->mfi_capabilities.support_additional_msix = 1;
/* driver supports HA / Remote LUN over Fast Path interface */ /* driver supports HA / Remote LUN over Fast Path interface */
drv_ops->mfi_capabilities.support_fp_remote_lun = 1; drv_ops->mfi_capabilities.support_fp_remote_lun = 1;
...@@ -1491,7 +1494,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance, ...@@ -1491,7 +1494,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance,
fusion = instance->ctrl_context; fusion = instance->ctrl_context;
if (fusion->adapter_type == INVADER_SERIES) { if (fusion->adapter_type >= INVADER_SERIES) {
struct MPI25_IEEE_SGE_CHAIN64 *sgl_ptr_end = sgl_ptr; struct MPI25_IEEE_SGE_CHAIN64 *sgl_ptr_end = sgl_ptr;
sgl_ptr_end += fusion->max_sge_in_main_msg - 1; sgl_ptr_end += fusion->max_sge_in_main_msg - 1;
sgl_ptr_end->Flags = 0; sgl_ptr_end->Flags = 0;
...@@ -1508,7 +1511,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance, ...@@ -1508,7 +1511,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance,
sgl_ptr->Length = cpu_to_le32(sg_dma_len(os_sgl)); sgl_ptr->Length = cpu_to_le32(sg_dma_len(os_sgl));
sgl_ptr->Address = cpu_to_le64(sg_dma_address(os_sgl)); sgl_ptr->Address = cpu_to_le64(sg_dma_address(os_sgl));
sgl_ptr->Flags = 0; sgl_ptr->Flags = 0;
if (fusion->adapter_type == INVADER_SERIES) if (fusion->adapter_type >= INVADER_SERIES)
if (i == sge_count - 1) if (i == sge_count - 1)
sgl_ptr->Flags = IEEE_SGE_FLAGS_END_OF_LIST; sgl_ptr->Flags = IEEE_SGE_FLAGS_END_OF_LIST;
sgl_ptr++; sgl_ptr++;
...@@ -1519,7 +1522,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance, ...@@ -1519,7 +1522,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance,
(sge_count > fusion->max_sge_in_main_msg)) { (sge_count > fusion->max_sge_in_main_msg)) {
struct MPI25_IEEE_SGE_CHAIN64 *sg_chain; struct MPI25_IEEE_SGE_CHAIN64 *sg_chain;
if (fusion->adapter_type == INVADER_SERIES) { if (fusion->adapter_type >= INVADER_SERIES) {
if ((le16_to_cpu(cmd->io_request->IoFlags) & if ((le16_to_cpu(cmd->io_request->IoFlags) &
MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) != MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) !=
MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH)
...@@ -1535,7 +1538,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance, ...@@ -1535,7 +1538,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance,
sg_chain = sgl_ptr; sg_chain = sgl_ptr;
/* Prepare chain element */ /* Prepare chain element */
sg_chain->NextChainOffset = 0; sg_chain->NextChainOffset = 0;
if (fusion->adapter_type == INVADER_SERIES) if (fusion->adapter_type >= INVADER_SERIES)
sg_chain->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT; sg_chain->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT;
else else
sg_chain->Flags = sg_chain->Flags =
...@@ -2286,7 +2289,7 @@ megasas_build_syspd_fusion(struct megasas_instance *instance, ...@@ -2286,7 +2289,7 @@ megasas_build_syspd_fusion(struct megasas_instance *instance,
pRAID_Context->timeout_value = pRAID_Context->timeout_value =
cpu_to_le16((os_timeout_value > timeout_limit) ? cpu_to_le16((os_timeout_value > timeout_limit) ?
timeout_limit : os_timeout_value); timeout_limit : os_timeout_value);
if (fusion->adapter_type == INVADER_SERIES) if (fusion->adapter_type >= INVADER_SERIES)
io_request->IoFlags |= io_request->IoFlags |=
cpu_to_le16(MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH); cpu_to_le16(MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH);
...@@ -2998,7 +3001,7 @@ build_mpt_mfi_pass_thru(struct megasas_instance *instance, ...@@ -2998,7 +3001,7 @@ build_mpt_mfi_pass_thru(struct megasas_instance *instance,
io_req = cmd->io_request; io_req = cmd->io_request;
if (fusion->adapter_type == INVADER_SERIES) { if (fusion->adapter_type >= INVADER_SERIES) {
struct MPI25_IEEE_SGE_CHAIN64 *sgl_ptr_end = struct MPI25_IEEE_SGE_CHAIN64 *sgl_ptr_end =
(struct MPI25_IEEE_SGE_CHAIN64 *)&io_req->SGL; (struct MPI25_IEEE_SGE_CHAIN64 *)&io_req->SGL;
sgl_ptr_end += fusion->max_sge_in_main_msg - 1; sgl_ptr_end += fusion->max_sge_in_main_msg - 1;
......
...@@ -107,6 +107,7 @@ enum MR_RAID_FLAGS_IO_SUB_TYPE { ...@@ -107,6 +107,7 @@ enum MR_RAID_FLAGS_IO_SUB_TYPE {
enum MR_FUSION_ADAPTER_TYPE { enum MR_FUSION_ADAPTER_TYPE {
THUNDERBOLT_SERIES = 0, THUNDERBOLT_SERIES = 0,
INVADER_SERIES = 1, INVADER_SERIES = 1,
VENTURA_SERIES = 2,
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment