scsi: megaraid_sas: use adapter_type for all gen controllers
No functional change. Refactor adapter_type to set for all generation controllers, not just for fusion controllers. Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com> Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
c9edcb2e17
commit
c365178f31
@@ -845,7 +845,7 @@ megasas_ioc_init_fusion(struct megasas_instance *instance)
|
||||
drv_ops = (MFI_CAPABILITIES *) &(init_frame->driver_operations);
|
||||
|
||||
/* driver support Extended MSIX */
|
||||
if (fusion->adapter_type >= INVADER_SERIES)
|
||||
if (instance->adapter_type >= INVADER_SERIES)
|
||||
drv_ops->mfi_capabilities.support_additional_msix = 1;
|
||||
/* driver supports HA / Remote LUN over Fast Path interface */
|
||||
drv_ops->mfi_capabilities.support_fp_remote_lun = 1;
|
||||
@@ -1803,7 +1803,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance,
|
||||
|
||||
fusion = instance->ctrl_context;
|
||||
|
||||
if (fusion->adapter_type >= INVADER_SERIES) {
|
||||
if (instance->adapter_type >= INVADER_SERIES) {
|
||||
struct MPI25_IEEE_SGE_CHAIN64 *sgl_ptr_end = sgl_ptr;
|
||||
sgl_ptr_end += fusion->max_sge_in_main_msg - 1;
|
||||
sgl_ptr_end->Flags = 0;
|
||||
@@ -1813,7 +1813,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance,
|
||||
sgl_ptr->Length = cpu_to_le32(sg_dma_len(os_sgl));
|
||||
sgl_ptr->Address = cpu_to_le64(sg_dma_address(os_sgl));
|
||||
sgl_ptr->Flags = 0;
|
||||
if (fusion->adapter_type >= INVADER_SERIES)
|
||||
if (instance->adapter_type >= INVADER_SERIES)
|
||||
if (i == sge_count - 1)
|
||||
sgl_ptr->Flags = IEEE_SGE_FLAGS_END_OF_LIST;
|
||||
sgl_ptr++;
|
||||
@@ -1823,7 +1823,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance,
|
||||
(sge_count > fusion->max_sge_in_main_msg)) {
|
||||
|
||||
struct MPI25_IEEE_SGE_CHAIN64 *sg_chain;
|
||||
if (fusion->adapter_type >= INVADER_SERIES) {
|
||||
if (instance->adapter_type >= INVADER_SERIES) {
|
||||
if ((le16_to_cpu(cmd->io_request->IoFlags) &
|
||||
MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) !=
|
||||
MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH)
|
||||
@@ -1839,7 +1839,7 @@ megasas_make_sgl_fusion(struct megasas_instance *instance,
|
||||
sg_chain = sgl_ptr;
|
||||
/* Prepare chain element */
|
||||
sg_chain->NextChainOffset = 0;
|
||||
if (fusion->adapter_type >= INVADER_SERIES)
|
||||
if (instance->adapter_type >= INVADER_SERIES)
|
||||
sg_chain->Flags = IEEE_SGE_FLAGS_CHAIN_ELEMENT;
|
||||
else
|
||||
sg_chain->Flags =
|
||||
@@ -2416,7 +2416,7 @@ megasas_build_ldio_fusion(struct megasas_instance *instance,
|
||||
cmd->request_desc->SCSIIO.RequestFlags =
|
||||
(MPI2_REQ_DESCRIPT_FLAGS_FP_IO
|
||||
<< MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
|
||||
if (fusion->adapter_type == INVADER_SERIES) {
|
||||
if (instance->adapter_type == INVADER_SERIES) {
|
||||
if (io_request->RaidContext.raid_context.reg_lock_flags ==
|
||||
REGION_TYPE_UNUSED)
|
||||
cmd->request_desc->SCSIIO.RequestFlags =
|
||||
@@ -2481,7 +2481,7 @@ megasas_build_ldio_fusion(struct megasas_instance *instance,
|
||||
cmd->request_desc->SCSIIO.RequestFlags =
|
||||
(MEGASAS_REQ_DESCRIPT_FLAGS_LD_IO
|
||||
<< MEGASAS_REQ_DESCRIPT_FLAGS_TYPE_SHIFT);
|
||||
if (fusion->adapter_type == INVADER_SERIES) {
|
||||
if (instance->adapter_type == INVADER_SERIES) {
|
||||
if (io_info.do_fp_rlbypass ||
|
||||
(io_request->RaidContext.raid_context.reg_lock_flags
|
||||
== REGION_TYPE_UNUSED))
|
||||
@@ -2702,7 +2702,7 @@ megasas_build_syspd_fusion(struct megasas_instance *instance,
|
||||
pRAID_Context->timeout_value =
|
||||
cpu_to_le16((os_timeout_value > timeout_limit) ?
|
||||
timeout_limit : os_timeout_value);
|
||||
if (fusion->adapter_type >= INVADER_SERIES)
|
||||
if (instance->adapter_type >= INVADER_SERIES)
|
||||
io_request->IoFlags |=
|
||||
cpu_to_le16(MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH);
|
||||
|
||||
@@ -3315,7 +3315,7 @@ build_mpt_mfi_pass_thru(struct megasas_instance *instance,
|
||||
|
||||
io_req = cmd->io_request;
|
||||
|
||||
if (fusion->adapter_type >= INVADER_SERIES) {
|
||||
if (instance->adapter_type >= INVADER_SERIES) {
|
||||
struct MPI25_IEEE_SGE_CHAIN64 *sgl_ptr_end =
|
||||
(struct MPI25_IEEE_SGE_CHAIN64 *)&io_req->SGL;
|
||||
sgl_ptr_end += fusion->max_sge_in_main_msg - 1;
|
||||
|
Reference in New Issue
Block a user