megaraid_sas: Updates for scsi-next
Subsystems (2)
v3 cover megaraid_sas: Updates for scsi-next
Sasikumar Chandrasekaran (11):
megaraid_sas: Add new pci device Ids for SAS3.5 Generic Megaraid
Controllers
megaraid_sas: 128 MSIX Support
megaraid_sas: EEDP Escape Mode Support for SAS3.5 Generic Megaraid
Controllers
megaraid_sas: SAS3.5 Generic Megaraid Controllers Stream Detection and
IO Coalescing
megaraid_sas: SAS3.5 Generic Megaraid Controllers Fast Path for RAID
1/10 Writes
megaraid_sas: Dynamic Raid Map Changes for SAS3.5 Generic Megaraid
Controllers
megaraid_sas: Add the Support for SAS3.5 Generic Megaraid Controllers
Capabilities
megaraid_sas: Enable or Disable Fast path based on the PCI Threshold
Bandwidth
megaraid_sas: ldio_outstanding variable is not decremented in
completion path
megaraid_sas: Implement the PD Map support for SAS3.5 Generic Megaraid
Controllers
megaraid_sas: driver version upgrade
drivers/scsi/megaraid/megaraid_sas.h | 142 ++++-- drivers/scsi/megaraid/megaraid_sas_base.c | 246 +++++++-- drivers/scsi/megaraid/megaraid_sas_fp.c | 343 +++++++++++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 756 +++++++++++++++++++++++----- drivers/scsi/megaraid/megaraid_sas_fusion.h | 364 ++++++++++++-- 5 files changed, 1573 insertions(+), 278 deletions(-)
Signature · 1 line
1.8.3.1
PATCH v3 1/11 megaraid_sas: Add new pci device Ids for SAS3.5 Generic Megaraid Controllers
This patch contains new pci device ids for SAS3.5 Generic Megaraid Controllers
--- drivers/scsi/megaraid/megaraid_sas.h | 11 ++++++++++- drivers/scsi/megaraid/megaraid_sas_base.c | 20 ++++++++++++++++++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 30 ++++++++++++++++++++++------- 3 files changed, 52 insertions(+), 9 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +10 -1
@@ -56,6 +56,14 @@#define PCI_DEVICE_ID_LSI_INTRUDER_24 0x00cf#define PCI_DEVICE_ID_LSI_CUTLASS_52 0x0052#define PCI_DEVICE_ID_LSI_CUTLASS_53 0x0053 +#define PCI_DEVICE_ID_LSI_MECTOR 0x00D4 +#define PCI_DEVICE_ID_LSI_VENTURA 0x0014 +#define PCI_DEVICE_ID_LSI_CRUSADER 0x0015 +#define PCI_DEVICE_ID_LSI_HARPOON 0x0016 +#define PCI_DEVICE_ID_LSI_TOMCAT 0x0017 +#define PCI_DEVICE_ID_LSI_VENTURA_4PORT 0x001B +#define PCI_DEVICE_ID_LSI_CRUSADER_4PORT 0x001C +#define PCI_DEVICE_ID_LSI_MARLIN 0x00D3/* * Intel HBA SSDIDs
@@ -1478,7 +1486,7 @@ struct megasas_register_set {u32 inbound_high_queue_port ;/*00C4h*/ -u32 reserved_5;/*00C8h*/ +u32 inbound_single_queue_port;/*00C8h*/ u32 res_6[11 ];/*CCh*/ u32 host_diag;u32 seq_offset;
@@ -2143,6 +2151,7 @@ struct megasas_instance {u8 is_rdpq;bool dev_handle;bool fw_sync_cache_support; +bool is_ventura; };struct MR_LD_VF_MAP {u32 size;
drivers/scsi/megaraid/megaraid_sas_base.c +19 -1
@@ -155,6 +155,15 @@ static int megasas_register_aen(struct megasas_instance *instance,/* Intruder 24 port*/ {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_CUTLASS_52)}, {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_CUTLASS_53)}, +/* VENTURA */ + {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_VENTURA)}, + {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_MARLIN)}, + {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_MECTOR)}, + {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_CRUSADER)}, + {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_HARPOON)}, + {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_TOMCAT)}, + {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_VENTURA_4PORT)}, + {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_CRUSADER_4PORT)}, {} };
@@ -5723,6 +5732,15 @@ static int megasas_probe_one(struct pci_dev *pdev, instance->pdev = pdev;switch (instance->pdev->device) { +case PCI_DEVICE_ID_LSI_VENTURA : +case PCI_DEVICE_ID_LSI_MARLIN : +case PCI_DEVICE_ID_LSI_MECTOR : +case PCI_DEVICE_ID_LSI_CRUSADER : +case PCI_DEVICE_ID_LSI_HARPOON : +case PCI_DEVICE_ID_LSI_TOMCAT : +case PCI_DEVICE_ID_LSI_VENTURA_4PORT : +case PCI_DEVICE_ID_LSI_CRUSADER_4PORT : + instance->is_ventura = true;case PCI_DEVICE_ID_LSI_FUSION :case PCI_DEVICE_ID_LSI_PLASMA :case PCI_DEVICE_ID_LSI_INVADER :
@@ -5747,7 +5765,7 @@ static int megasas_probe_one(struct pci_dev *pdev,if ((instance->pdev->device ==PCI_DEVICE_ID_LSI_FUSION ) || (instance->pdev->device ==PCI_DEVICE_ID_LSI_PLASMA )) fusion->adapter_type =THUNDERBOLT_SERIES ; -else +else if (!instance->is_ventura) fusion->adapter_type =INVADER_SERIES ; }break ;
drivers/scsi/megaraid/megaraid_sas_fusion.c +23 -7
@@ -189,15 +189,29 @@ inline void megasas_return_cmd_fusion(struct megasas_instance *instance,*/ static void megasas_fire_cmd_fusion (struct megasas_instance *instance, -union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc) +union MEGASAS_REQUEST_DESCRIPTOR_UNION *req_desc,bool is_32bit) { +struct megasas_register_set __iomem *regs = instance->reg_set; +unsigned long flags; + +if (is_32bit) +writel (le32_to_cpu (req_desc->u.low), + &(regs)->inbound_single_queue_port); +else if (instance->is_ventura) { +spin_lock_irqsave (&instance->hba_lock, flags); +writel (le32_to_cpu (req_desc->u.low), + &(regs)->inbound_low_queue_port); +writel (le32_to_cpu (req_desc->u.high), + &(regs)->inbound_high_queue_port); +mmiowb (); +spin_unlock_irqrestore (&instance->hba_lock, flags); + }else {#if defined(writeq) && defined(CONFIG_64BIT )u64 req_data = (((u64 )le32_to_cpu (req_desc->u.high) <<32 ) |le32_to_cpu (req_desc->u.low));writeq (req_data, &instance->reg_set->inbound_low_queue_port);#else -unsigned long flags;spin_lock_irqsave (&instance->hba_lock, flags); writel(le32_to_cpu(req_desc->u.low),
@@ -207,6 +221,7 @@ inline void megasas_return_cmd_fusion(struct megasas_instance *instance,mmiowb ();spin_unlock_irqrestore (&instance->hba_lock, flags);#endif + } }/**
@@ -850,7 +865,7 @@ static int megasas_create_sg_sense_fusion(struct megasas_instance *instance)break ; } -megasas_fire_cmd_fusion (instance, &req_desc); +megasas_fire_cmd_fusion (instance, &req_desc, false);wait_and_poll (instance, cmd,MFI_POLL_TIMEOUT_SECS );
@@ -2224,7 +2239,7 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance,*/ atomic_inc (&instance->fw_outstanding); -megasas_fire_cmd_fusion (instance, req_desc); +megasas_fire_cmd_fusion (instance, req_desc, instance->is_ventura);return 0 ; }
@@ -2595,7 +2610,7 @@ irqreturn_t megasas_isr_fusion(int irq, void *devp)return DCMD_NOT_FIRED ; } -megasas_fire_cmd_fusion (instance, req_desc); +megasas_fire_cmd_fusion (instance, req_desc, instance->is_ventura);return DCMD_SUCCESS ; }
@@ -2888,7 +2903,8 @@ void megasas_refire_mgmt_cmd(struct megasas_instance *instance) cpu_to_le32(MR_DCMD_SYSTEM_PD_MAP_GET_INFO))) && !(cmd_mfi->flags &DRV_DCMD_SKIP_REFIRE );if (refire_cmd) -megasas_fire_cmd_fusion (instance, req_desc); +megasas_fire_cmd_fusion (instance, req_desc, + instance->is_ventura);else megasas_return_cmd (instance, cmd_mfi); }
@@ -3067,7 +3083,7 @@ static int megasas_track_scsiio(struct megasas_instance *instance, mr_request->tmReqFlags.isTMForLD =1 ;init_completion (&cmd_fusion->done); -megasas_fire_cmd_fusion (instance, req_desc); +megasas_fire_cmd_fusion (instance, req_desc, instance->is_ventura); timeleft =wait_for_completion_timeout (&cmd_fusion->done,50 *HZ );
Signature · 1 line
1.8.3.1
PATCH v3 2/11 megaraid_sas: 128 MSIX Support
In reply to Sasikumar ChandrasekaranSAS3.5 Generic Megaraid based Controllers will have the support for 128 MSI-X vectors, resulting in the need to support 128 reply queues
This patch is depending on patch 1
--- drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_base.c | 24 +++++++++++++++++------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 4 ++-- 3 files changed, 20 insertions(+), 9 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +1 -0
@@ -2152,6 +2152,7 @@ struct megasas_instance {bool dev_handle;bool fw_sync_cache_support;bool is_ventura; +bool msix_combined; };struct MR_LD_VF_MAP {u32 size;
drivers/scsi/megaraid/megaraid_sas_base.c +17 -7
@@ -5089,13 +5089,7 @@ static int megasas_init_fw(struct megasas_instance *instance) goto fail_ready_state; } -/* -* MSI-X host index 0 is common for all adapter. -* It is used for all MPT based Adapters. -*/ - instance->reply_post_host_index_addr[0 ] = - (u32 __iomem *)((u8 __iomem *)instance->reg_set + -MPI2_REPLY_POST_HOST_INDEX_OFFSET ); +/* Check if MSI-X is supported while in ready state */ msix_enable = (instance->instancet->read_fw_status_reg(reg_set) &
@@ -5113,6 +5107,9 @@ static int megasas_init_fw(struct megasas_instance *instance) instance->msix_vectors = ((scratch_pad_2 &MR_MAX_REPLY_QUEUES_EXT_OFFSET ) >>MR_MAX_REPLY_QUEUES_EXT_OFFSET_SHIFT ) +1 ; +if (instance->msix_vectors >16 ) + instance->msix_combined = true; +if (rdpq_enable) instance->is_rdpq = (scratch_pad_2 &MR_RDPQ_MODE_OFFSET ) ?1 :0 ;
@@ -5146,6 +5143,19 @@ static int megasas_init_fw(struct megasas_instance *instance)else instance->msix_vectors =0 ; } +/* +* MSI-X host index 0 is common for all adapter. +* It is used for all MPT based Adapters. +*/ +if (instance->msix_combined) { + instance->reply_post_host_index_addr[0 ] = + (u32 *)((u8 *)instance->reg_set + +MPI2_SUP_REPLY_POST_HOST_INDEX_OFFSET ); + }else { + instance->reply_post_host_index_addr[0 ] = + (u32 *)((u8 *)instance->reg_set + +MPI2_REPLY_POST_HOST_INDEX_OFFSET ); + }dev_info (&instance->pdev->dev,"firmware supports msix\t: (%d)" , fw_msix_count);
drivers/scsi/megaraid/megaraid_sas_fusion.c +2 -2
@@ -2391,7 +2391,7 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance,* pending to be completed */ if (threshold_reply_count >=THRESHOLD_REPLY_COUNT ) { -if (fusion->adapter_type ==INVADER_SERIES ) +if (instance->msix_combined)writel (((MSIxIndex &0x7 ) <<24 ) | fusion->last_reply_idx[MSIxIndex], instance->reply_post_host_index_addr[MSIxIndex/8 ]);
@@ -2407,7 +2407,7 @@ static void megasas_build_ld_nonrw_fusion(struct megasas_instance *instance,return IRQ_NONE ;wmb (); -if (fusion->adapter_type ==INVADER_SERIES ) +if (instance->msix_combined)writel (((MSIxIndex &0x7 ) <<24 ) | fusion->last_reply_idx[MSIxIndex], instance->reply_post_host_index_addr[MSIxIndex/8 ]);
Signature · 1 line
1.8.3.1
PATCH v3 3/11 megaraid_sas: EEDP Escape Mode Support for SAS3.5 Generic Megaraid Controllers
In reply to Sasikumar ChandrasekaranAn UNMAP command on a PI formatted device will leave the Logical Block Application Tag and Logical Block Reference Tag as all F's (for those LBAs that are unmapped). To avoid IO errors if those LBAs are subsequently read before they are written with valid tag fields, the MPI SCSI IO requests need to set the EEDPFlags element EEDP Escape Mode field, Bits [7:6] appropriately. A value of 2 should be set to disable all PI checks if the Logical Block Application Tag is 0xFFFF for PI types 1 and 2. A value of 3 should be set to disable all PI checks if the Logical Block Application Tag is 0xFFFF and the Logical Block Reference Tag is 0xFFFFFFFF for PI type 3.
This patch is depending on patch 2
--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 ++ 2 files changed, 3 insertions(+)
drivers/scsi/megaraid/megaraid_sas_fusion.c +1 -0
@@ -1589,6 +1589,7 @@ static int megasas_create_sg_sense_fusion(struct megasas_instance *instance)MPI2_SCSIIO_EEDPFLAGS_CHECK_REFTAG |MPI2_SCSIIO_EEDPFLAGS_CHECK_REMOVE_OP |MPI2_SCSIIO_EEDPFLAGS_CHECK_APPTAG | +MPI25_SCSIIO_EEDPFLAGS_DO_NOT_DISABLE_MODE | MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD); }else { io_request->EEDPFlags = cpu_to_le16(
drivers/scsi/megaraid/megaraid_sas_fusion.h +2 -0
@@ -175,6 +175,8 @@ enum REGION_TYPE {#define MPI2_SCSIIO_EEDPFLAGS_CHECK_APPTAG (0x0200)#define MPI2_SCSIIO_EEDPFLAGS_CHECK_GUARD (0x0100)#define MPI2_SCSIIO_EEDPFLAGS_INSERT_OP (0x0004) +/* EEDP escape mode */ +#define MPI25_SCSIIO_EEDPFLAGS_DO_NOT_DISABLE_MODE (0x0040)#define MPI2_FUNCTION_SCSI_IO_REQUEST (0x00)/* SCSI IO */ #define MPI2_FUNCTION_SCSI_TASK_MGMT (0x01)#define MPI2_REQ_DESCRIPT_FLAGS_HIGH_PRIORITY (0x03)
Signature · 1 line
1.8.3.1
PATCH v3 4/11 megaraid_sas: SAS3.5 Generic Megaraid Controllers Stream Detection and IO Coalescing
In reply to Sasikumar ChandrasekaranDetect sequential IO streams and pass those IOs directly to FW.
This patch is depending on patch 3
--- drivers/scsi/megaraid/megaraid_sas.h | 5 +- drivers/scsi/megaraid/megaraid_sas_base.c | 43 +++++++- drivers/scsi/megaraid/megaraid_sas_fp.c | 2 + drivers/scsi/megaraid/megaraid_sas_fusion.c | 164 +++++++++++++++++++++++----- drivers/scsi/megaraid/megaraid_sas_fusion.h | 117 +++++++++++++++++++- 5 files changed, 298 insertions(+), 33 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +3 -2
@@ -108,7 +108,7 @@*/ /* -* MFI stands for MegaRAID SAS FW Interface. This is just a moniker for +* MFI stands for MegaRAID SAS FW Interface. This is just a moniker for * protocol between the software and firmware. Commands are issued using * "message frames" */
@@ -1443,7 +1443,7 @@ enum FW_BOOT_CONTEXT {* register set for both 1068 and 1078 controllers * structure extended for 1078 registers */ - +struct megasas_register_set {u32 doorbell;/*0000h*/ u32 fusion_seq_offset;/*0004h*/
@@ -2073,6 +2073,7 @@ struct megasas_instance {/* used to sync fire the cmd to fw */ spinlock_t hba_lock;/* used to synch producer, consumer ptrs in dpc */ +spinlock_t stream_lock;spinlock_t completion_lock;struct dma_pool *frame_dma_pool;struct dma_pool *sense_dma_pool;
drivers/scsi/megaraid/megaraid_sas_base.c +42 -1
73 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fp.c +2 -0
@@ -935,6 +935,8 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, ld =MR_TargetIdToLdGet (ldTgtId, map); raid =MR_LdRaidGet (ld, map); +/*check read ahead bit*/ + io_info->ra_capable = raid->capability.ra_capable;/* * if rowDataSize @RAID map and spanRowDataSize @SPAN INFO are zero
drivers/scsi/megaraid/megaraid_sas_fusion.c +137 -27
279 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fusion.h +114 -3
162 lines not on this page · raw message
Signature · 1 line
1.8.3.1
PATCH v3 5/11 megaraid_sas: SAS3.5 Generic Megaraid Controllers Fast Path for RAID 1/10 Writes
In reply to Sasikumar ChandrasekaranTo improve RAID 1/10 Write performance, OS drivers need to issue the required Write IOs as Fast Path IOs (after the appropriate checks allowing Fast Path to be used) to the appropriate physical drives (translated from the OS logical IO) and wait for all Write IOs to complete. If any of the Write IOs fail or time out, the IO will be re issued to FW as an LD IO so FW can perform the error handling.
This patch is depending on patch 4
--- drivers/scsi/megaraid/megaraid_sas.h | 1 + drivers/scsi/megaraid/megaraid_sas_fp.c | 31 ++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 341 ++++++++++++++++++++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.h | 15 +- 4 files changed, 334 insertions(+), 54 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +1 -0
@@ -2059,6 +2059,7 @@ struct megasas_instance {u16 max_num_sge;u16 max_fw_cmds; +u16 max_mpt_cmds;u16 max_mfi_cmds;u16 max_scsi_cmds;u16 ldio_threshold;
drivers/scsi/megaraid/megaraid_sas_fp.c +25 -6
@@ -737,7 +737,7 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld, struct MR_DRV_RAID_MAP_ALL *map) {struct MR_LD_RAID *raid =MR_LdRaidGet (ld, map); -u32 pd, arRef; +u32 pd, arRef, r1_alt_pd;u8 physArm, span;u64 row;u8 retval = TRUE;
@@ -772,9 +772,16 @@ static u8 mr_spanset_get_phy_params(struct megasas_instance *instance, u32 ld, arRef =MR_LdSpanArrayGet (ld, span, map); pd =MR_ArPdGet (arRef, physArm, map); -if (pd !=MR_PD_INVALID ) +if (pd !=MR_PD_INVALID ) { *pDevHandle =MR_PdDevHandleGet (pd, map); -else { +/* get second pd also for raid 1/10 fast path writes*/ +if (raid->level ==1 ) { + r1_alt_pd =MR_ArPdGet (arRef, physArm +1 , map); +if (r1_alt_pd !=MR_PD_INVALID ) + io_info->r1_alt_dev_handle = +MR_PdDevHandleGet (r1_alt_pd, map); + } + }else { *pDevHandle =cpu_to_le16 (MR_PD_INVALID ); if ((raid->level >= 5) && ((fusion->adapter_type == THUNDERBOLT_SERIES) ||
@@ -819,7 +826,7 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, struct MR_DRV_RAID_MAP_ALL *map) {struct MR_LD_RAID *raid =MR_LdRaidGet (ld, map); -u32 pd, arRef; +u32 pd, arRef, r1_alt_pd;u8 physArm, span;u64 row;u8 retval = TRUE;
@@ -867,10 +874,17 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow, arRef =MR_LdSpanArrayGet (ld, span, map); pd =MR_ArPdGet (arRef, physArm, map);/* Get the pd */ -if (pd !=MR_PD_INVALID ) +if (pd !=MR_PD_INVALID ) {/* Get dev handle from Pd. */ *pDevHandle =MR_PdDevHandleGet (pd, map); -else { +/* get second pd also for raid 1/10 fast path writes*/ +if (raid->level ==1 ) { + r1_alt_pd =MR_ArPdGet (arRef, physArm +1 , map); +if (r1_alt_pd !=MR_PD_INVALID ) + io_info->r1_alt_dev_handle = +MR_PdDevHandleGet (r1_alt_pd, map); + } + }else {/* set dev handle as invalid. */ *pDevHandle =cpu_to_le16 (MR_PD_INVALID ); if ((raid->level >= 5) &&
@@ -1126,6 +1140,11 @@ u8 MR_GetPhyParams(struct megasas_instance *instance, u32 ld, u64 stripRow,/* If IO on an invalid Pd, then FP is not possible.*/ if (io_info->devHandle ==cpu_to_le16 (MR_PD_INVALID )) io_info->fpOkForIo = FALSE; +/* set raid 1/10 fast path write capable bit in io_info */ +if (io_info->fpOkForIo && + (io_info->r1_alt_dev_handle !=MR_PD_INVALID ) && + (raid->level ==1 ) && !isRead) + io_info->is_raid_1_fp_write =1 ;return retval; }else if (isRead) {uint stripIdx;
drivers/scsi/megaraid/megaraid_sas_fusion.c +295 -46
572 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fusion.h +13 -2
@@ -94,6 +94,7 @@ enum MR_RAID_FLAGS_IO_SUB_TYPE {#define MEGASAS_FP_CMD_LEN 16#define MEGASAS_FUSION_IN_RESET 0#define THRESHOLD_REPLY_COUNT 50 +#define RAID_1_10_RMW_CMDS 3#define JBOD_MAPS_COUNT 2enum MR_FUSION_ADAPTER_TYPE {
@@ -728,7 +729,9 @@ struct MR_SPAN_BLOCK_INFO {struct MR_LD_RAID {struct {#if defined(__BIG_ENDIAN_BITFIELD) -u32 reserved4:5 ; +u32 reserved4:3 ; +u32 fp_cache_bypass_capable:1 ; +u32 fp_rmw_capable:1 ;u32 fpBypassRegionLock:1 ;u32 tmCapable:1 ;u32 fpNonRWCapable:1 ;
@@ -756,7 +759,9 @@ struct MR_LD_RAID { u32 fpNonRWCapable:1; u32 tmCapable:1; u32 fpBypassRegionLock:1; - u32 reserved4:5; + u32 fp_rmw_capable:1; + u32 fp_cache_bypass_capable:1; + u32 reserved4:3;#endif } capability;__le32 reserved6;
@@ -830,6 +835,8 @@ struct IO_REQUEST_INFO {u64 start_row;u8 span_arm;/* span[7:5], arm[4:0] */ u8 pd_after_lb; +u16 r1_alt_dev_handle;/* raid 1/10 only */ +bool is_raid_1_fp_write;bool ra_capable; };
@@ -883,6 +890,10 @@ struct megasas_cmd_fusion {u32 index;u8 pd_r1_lb;struct completion done; +bool is_raid_1_fp_write; +u16 r1_alt_dev_handle;/* raid 1/10 only*/ +bool cmd_completed;/* raid 1/10 fp writes status holder */ + };struct LD_LOAD_BALANCE_INFO {
Signature · 1 line
1.8.3.1
PATCH v3 7/11 megaraid_sas: Add the Support for SAS3.5 Generic Megaraid Controllers Capabilities
In reply to Sasikumar ChandrasekaranThe Megaraid driver has to support the SAS3.5 Generic Megaraid Controllers Firmware functionality.
This patch is depending on patch 6
--- drivers/scsi/megaraid/megaraid_sas_base.c | 53 ++++++++++++++--------------- drivers/scsi/megaraid/megaraid_sas_fusion.c | 19 ++++++----- drivers/scsi/megaraid/megaraid_sas_fusion.h | 1 + 3 files changed, 37 insertions(+), 36 deletions(-)
drivers/scsi/megaraid/megaraid_sas_base.c +25 -28
@@ -5060,34 +5060,29 @@ static int megasas_init_fw(struct megasas_instance *instance) reg_set = instance->reg_set; -switch (instance->pdev->device) { -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 : +if (fusion) instance->instancet = &megasas_instance_template_fusion; -break ; -case PCI_DEVICE_ID_LSI_SAS1078R : -case PCI_DEVICE_ID_LSI_SAS1078DE : - instance->instancet = &megasas_instance_template_ppc; -break ; -case PCI_DEVICE_ID_LSI_SAS1078GEN2 : -case PCI_DEVICE_ID_LSI_SAS0079GEN2 : - instance->instancet = &megasas_instance_template_gen2; -break ; -case PCI_DEVICE_ID_LSI_SAS0073SKINNY : -case PCI_DEVICE_ID_LSI_SAS0071SKINNY : - instance->instancet = &megasas_instance_template_skinny; -break ; -case PCI_DEVICE_ID_LSI_SAS1064R : -case PCI_DEVICE_ID_DELL_PERC5 : -default : - instance->instancet = &megasas_instance_template_xscale; -break ; +else { +switch (instance->pdev->device) { +case PCI_DEVICE_ID_LSI_SAS1078R : +case PCI_DEVICE_ID_LSI_SAS1078DE : + instance->instancet = &megasas_instance_template_ppc; +break ; +case PCI_DEVICE_ID_LSI_SAS1078GEN2 : +case PCI_DEVICE_ID_LSI_SAS0079GEN2 : + instance->instancet = &megasas_instance_template_gen2; +break ; +case PCI_DEVICE_ID_LSI_SAS0073SKINNY : +case PCI_DEVICE_ID_LSI_SAS0071SKINNY : + instance->instancet = &megasas_instance_template_skinny; +break ; +case PCI_DEVICE_ID_LSI_SAS1064R : +case PCI_DEVICE_ID_DELL_PERC5 : +default : + instance->instancet = &megasas_instance_template_xscale; + instance->pd_list_not_supported =1 ; +break ; + } }if (megasas_transition_to_ready (instance,0 )) {
@@ -5834,7 +5829,9 @@ static int megasas_probe_one(struct pci_dev *pdev,if ((instance->pdev->device ==PCI_DEVICE_ID_LSI_FUSION ) || (instance->pdev->device ==PCI_DEVICE_ID_LSI_PLASMA )) 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 ; }break ;
drivers/scsi/megaraid/megaraid_sas_fusion.c +11 -8
@@ -244,7 +244,10 @@ inline void megasas_return_cmd_fusion(struct megasas_instance *instance, 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) cur_max_fw_cmds = instance->instancet->read_fw_status_reg (reg_set) &0x00FFFF ;
@@ -843,7 +846,7 @@ static int megasas_create_sg_sense_fusion(struct megasas_instance *instance) drv_ops = (MFI_CAPABILITIES *) &(init_frame->driver_operations);/* driver support Extended MSIX */ -if (fusion->adapter_type ==INVADER_SERIES ) +if (fusion->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 ;
@@ -1497,7 +1500,7 @@ static int megasas_create_sg_sense_fusion(struct megasas_instance *instance) 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; sgl_ptr_end += fusion->max_sge_in_main_msg -1 ; sgl_ptr_end->Flags =0 ;
@@ -1514,7 +1517,7 @@ static int megasas_create_sg_sense_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 (fusion->adapter_type >=INVADER_SERIES )if (i == sge_count -1 ) sgl_ptr->Flags =IEEE_SGE_FLAGS_END_OF_LIST ; sgl_ptr++;
@@ -1525,7 +1528,7 @@ static int megasas_create_sg_sense_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 (fusion->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 )
@@ -1541,7 +1544,7 @@ static int megasas_create_sg_sense_fusion(struct megasas_instance *instance) sg_chain = sgl_ptr;/* Prepare chain element */ sg_chain->NextChainOffset =0 ; -if (fusion->adapter_type ==INVADER_SERIES ) +if (fusion->adapter_type >=INVADER_SERIES ) sg_chain->Flags =IEEE_SGE_FLAGS_CHAIN_ELEMENT ;else sg_chain->Flags =
@@ -2292,7 +2295,7 @@ static void megasas_build_ld_nonrw_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 (fusion->adapter_type >=INVADER_SERIES ) io_request->IoFlags |=cpu_to_le16 (MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH );
@@ -3005,7 +3008,7 @@ irqreturn_t megasas_isr_fusion(int irq, void *devp) 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 *)&io_req->SGL; sgl_ptr_end += fusion->max_sge_in_main_msg -1 ;
drivers/scsi/megaraid/megaraid_sas_fusion.h +1 -0
@@ -107,6 +107,7 @@ enum MR_RAID_FLAGS_IO_SUB_TYPE {enum MR_FUSION_ADAPTER_TYPE {THUNDERBOLT_SERIES =0 ,INVADER_SERIES =1 , +VENTURA_SERIES =2 , };/*
Signature · 1 line
1.8.3.1
PATCH v3 8/11 megaraid_sas: Enable or Disable Fast path based on the PCI Threshold Bandwidth
In reply to Sasikumar ChandrasekaranLarge SEQ IO workload should sent as non fast path commands
This patch is depending on patch 7
--- drivers/scsi/megaraid/megaraid_sas.h | 8 +++++ drivers/scsi/megaraid/megaraid_sas_base.c | 48 +++++++++++++++++++++++++++++ drivers/scsi/megaraid/megaraid_sas_fp.c | 11 +++++-- drivers/scsi/megaraid/megaraid_sas_fusion.c | 20 +++++++----- drivers/scsi/megaraid/megaraid_sas_fusion.h | 2 +- 5 files changed, 78 insertions(+), 11 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +8 -0
@@ -1432,6 +1432,8 @@ enum FW_BOOT_CONTEXT {#define MFI_1068_FW_HANDSHAKE_OFFSET 0x64#define MFI_1068_FW_READY 0xDDDD0000 +#define MEGASAS_RAID1_FAST_PATH_STATUS_CHECK_INTERVAL HZ +#define MR_MAX_REPLY_QUEUES_OFFSET 0X0000001F#define MR_MAX_REPLY_QUEUES_EXT_OFFSET 0X003FC000#define MR_MAX_REPLY_QUEUES_EXT_OFFSET_SHIFT 14
@@ -2104,6 +2106,10 @@ struct megasas_instance {atomic_t ldio_outstanding;atomic_t fw_reset_no_pci_access; +atomic64_t bytes_wrote;/* used for raid1 fast path enable or disable */ +atomic_t r1_write_fp_capable; + +struct megasas_instance_template *instancet;struct tasklet_struct isr_tasklet;struct work_struct work_init;
@@ -2146,6 +2152,7 @@ struct megasas_instance {long reset_flags;struct mutex reset_mutex;struct timer_list sriov_heartbeat_timer; +struct timer_list r1_fp_hold_timer;char skip_heartbeat_timer_del;u8 requestorId;char PlasmaFW111;
@@ -2162,6 +2169,7 @@ struct megasas_instance {bool is_ventura;bool msix_combined;u16 max_raid_mapsize; +u64 pci_threshold_bandwidth;/* used to control the fp writes */ };struct MR_LD_VF_MAP {u32 size;
drivers/scsi/megaraid/megaraid_sas_base.c +48 -0
84 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fp.c +9 -2
@@ -197,14 +197,19 @@ void MR_PopulateDrvRaidMap(struct megasas_instance *instance)if (instance->max_raid_mapsize) { fw_map_dyn = fusion->ld_map[(instance->map_id &1 )]; +if (fw_map_dyn->pci_threshold_bandwidth) + instance->pci_threshold_bandwidth = +le64_to_cpu (fw_map_dyn->pci_threshold_bandwidth);#if VD_EXT_DEBUG dev_dbg (&instance->pdev->dev," raidMapSize 0x%x fw_map_dyn->descTableOffset 0x%x, " -" descTableSize 0x%x descTableNumElements 0x%x\n" , +" descTableSize 0x%x descTableNumElements 0x%x, " +" PCIThreasholdBandwidth %llu\n" ,le32_to_cpu (fw_map_dyn->raid_map_size),le32_to_cpu (fw_map_dyn->desc_table_offset),le32_to_cpu (fw_map_dyn->desc_table_size), -le32_to_cpu (fw_map_dyn->desc_table_num_elements)); +le32_to_cpu (fw_map_dyn->desc_table_num_elements), + instance->pci_threshold_bandwidth);dev_dbg (&instance->pdev->dev,"drv map %p ldCount %d\n" , drv_map, fw_map_dyn->ld_count);#endif
@@ -434,6 +439,8 @@ void MR_PopulateDrvRaidMap(struct megasas_instance *instance)sizeof (struct MR_DEV_HANDLE_INFO ) * MAX_RAIDMAP_PHYSICAL_DEVICES); } +if (instance->is_ventura && !instance->pci_threshold_bandwidth) + instance->pci_threshold_bandwidth =ULLONG_MAX ; }/*
drivers/scsi/megaraid/megaraid_sas_fusion.c +12 -8
@@ -95,6 +95,7 @@ void megasas_start_timer(struct megasas_instance *instance,extern unsigned int dual_qdepth_disable;static void megasas_free_rdpq_fusion (struct megasas_instance *instance);static void megasas_free_reply_fusion (struct megasas_instance *instance); +void megasas_change_r1_fp_status (unsigned long instance_addr);
@@ -2633,8 +2634,9 @@ void megasas_prepare_secondRaid1_IO(struct megasas_instance *instance,* to get new command */ if (cmd->is_raid_1_fp_write && -atomic_inc_return (&instance->fw_outstanding) > - (instance->host->can_queue)) { + (atomic_inc_return (&instance->fw_outstanding) > + (instance->host->can_queue) || + (!atomic_read (&instance->r1_write_fp_capable)))) {megasas_fpio_to_ldio (instance, cmd, cmd->scmd);atomic_dec (&instance->fw_outstanding); }else if (cmd->is_raid_1_fp_write) {
@@ -2643,17 +2645,19 @@ void megasas_prepare_secondRaid1_IO(struct megasas_instance *instance,megasas_prepare_secondRaid1_IO (instance, cmd, r1_cmd); } -/* -* Issue the command to the FW -*/ +* Issue the command to the FW +*/ +if (scmd->sc_data_direction ==PCI_DMA_TODEVICE && instance->is_ventura) +atomic64_add (scsi_bufflen (scmd), &instance->bytes_wrote);megasas_fire_cmd_fusion (instance, req_desc, instance->is_ventura); -if (r1_cmd) +if (r1_cmd) { +atomic64_add (scsi_bufflen (scmd), &instance->bytes_wrote);megasas_fire_cmd_fusion (instance, r1_cmd->request_desc, - instance->is_ventura); - + instance->is_ventura); + }return 0 ; }
drivers/scsi/megaraid/megaraid_sas_fusion.h +1 -1
@@ -977,7 +977,7 @@ struct MR_FW_RAID_MAP_DYNAMIC {u32 desc_table_size;/* Total Size of desc table */ /* Total Number of elements in the desc table */ u32 desc_table_num_elements; -u64 reserved1; +u64 pci_threshold_bandwidth;u32 reserved2[3 ];/*future use */ /* timeout value used by driver in FP IOs */ u8 fp_pd_io_timeout_sec;
Signature · 1 line
1.8.3.1
PATCH v3 9/11 megaraid_sas: ldio_outstanding variable is not decremented in completion path
In reply to Sasikumar Chandrasekaranldio outstanding variable needs to be decremented in io completion path for iMR dual queue depth
This patch is depending on patch 8
--- drivers/scsi/megaraid/megaraid_sas_fusion.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
drivers/scsi/megaraid/megaraid_sas_fusion.c +7 -2
@@ -2584,7 +2584,6 @@ void megasas_prepare_secondRaid1_IO(struct megasas_instance *instance,if (atomic_inc_return (&instance->fw_outstanding) > instance->host->can_queue) { -dev_err (&instance->pdev->dev,"Throttle IOs beyond Controller queue depth\n" );atomic_dec (&instance->fw_outstanding);return SCSI_MLQUEUE_HOST_BUSY ; }
@@ -2818,6 +2817,10 @@ void megasas_prepare_secondRaid1_IO(struct megasas_instance *instance, = 0; scsi_io_req->RaidContext.raid_context.ex_status =0 ; +if (instance->ldio_threshold + &&megasas_cmd_type (scmd_local) + ==READ_WRITE_LDIO ) +atomic_dec (&instance->ldio_outstanding);megasas_return_cmd_fusion (instance, cmd_fusion);scsi_dma_unmap (scmd_local); scmd_local->scsi_done (scmd_local);
@@ -3966,7 +3969,9 @@ int megasas_reset_fusion(struct Scsi_Host *shost, int reason) scmd_local->result =megasas_check_mpio_paths (instance, scmd_local); -if (megasas_cmd_type (scmd_local) ==READ_WRITE_LDIO ) +if (instance->ldio_threshold && +megasas_cmd_type (scmd_local) + ==READ_WRITE_LDIO )atomic_dec (&instance->ldio_outstanding);megasas_return_cmd_fusion (instance, cmd_fusion);scsi_dma_unmap (scmd_local);
Signature · 1 line
1.8.3.1
PATCH v3 10/11 megaraid_sas: Implement the PD Map support for SAS3.5 Generic Megaraid Controllers
In reply to Sasikumar ChandrasekaranUpdate Linux driver to use new pdTargetId field for JBOD target ID
This patch is depending on patch 9
--- drivers/scsi/megaraid/megaraid_sas.h | 105 +++++++++++++++++++++------- drivers/scsi/megaraid/megaraid_sas_base.c | 3 + drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 + drivers/scsi/megaraid/megaraid_sas_fusion.h | 3 +- 4 files changed, 84 insertions(+), 28 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +78 -27
@@ -1320,7 +1320,55 @@ struct megasas_ctrl_info {#endif } adapterOperations3; -u8 pad[0x800 -0x7EC ]; +struct { +#if defined(__BIG_ENDIAN_BITFIELD) +u8 reserved:7 ; +/* Indicates whether the CPLD image is part of +* the package and stored in flash +*/ +u8 cpld_in_flash:1 ; +#else +u8 cpld_in_flash:1 ; +u8 reserved:7 ; +#endif +u8 reserved1[3 ]; +/* Null terminated string. Has the version +* information if cpld_in_flash = FALSE +*/ +u8 userCodeDefinition[12 ]; + } cpld;/* Valid only if upgradableCPLD is TRUE */ + +struct { +#if defined(__BIG_ENDIAN_BITFIELD) +u16 reserved:8 ; +u16 fw_swaps_bbu_vpd_info:1 ; +u16 support_pd_map_target_id:1 ; +u16 support_ses_ctrl_in_multipathcfg:1 ; +u16 image_upload_supported:1 ; +u16 support_encrypted_mfc:1 ; +u16 supported_enc_algo:1 ; +u16 support_ibutton_less:1 ; +u16 ctrl_info_ext_supported:1 ; +#else + +u16 ctrl_info_ext_supported:1 ; +u16 support_ibutton_less:1 ; +u16 supported_enc_algo:1 ; +u16 support_encrypted_mfc:1 ; +u16 image_upload_supported:1 ; +/* FW supports LUN based association and target port based */ +u16 support_ses_ctrl_in_multipathcfg:1 ; +/* association for the SES device connected in multipath mode */ +/* FW defines Jbod target Id within MR_PD_CFG_SEQ */ +u16 support_pd_map_target_id:1 ; +/* FW swaps relevant fields in MR_BBU_VPD_INFO_FIXED to +* provide the data in little endian order +*/ +u16 fw_swaps_bbu_vpd_info:1 ; +u16 reserved:8 ; +#endif + } adapter_operations4; +u8 pad[0x800 -0x7FE ];/* 0x7FE pad to 2K for expansion */ } __packed;/*
@@ -1560,33 +1608,35 @@ struct megasas_header { typedef union _MFI_CAPABILITIES { struct { #if defined(__BIG_ENDIAN_BITFIELD) - u32 reserved:20; - u32 support_qd_throttling:1; - u32 support_fp_rlbypass:1; - u32 support_vfid_in_ioframe:1; - u32 support_ext_io_size:1; - u32 support_ext_queue_depth:1; - u32 security_protocol_cmds_fw:1; - u32 support_core_affinity:1; - u32 support_ndrive_r1_lb:1; - u32 support_max_255lds:1; - u32 support_fastpath_wb:1; - u32 support_additional_msix:1; - u32 support_fp_remote_lun:1; + u32 reserved:19; + u32 support_pd_map_target_id:1; + u32 support_qd_throttling:1; + u32 support_fp_rlbypass:1; + u32 support_vfid_in_ioframe:1; + u32 support_ext_io_size:1; + u32 support_ext_queue_depth:1; + u32 security_protocol_cmds_fw:1; + u32 support_core_affinity:1; + u32 support_ndrive_r1_lb:1; + u32 support_max_255lds:1; + u32 support_fastpath_wb:1; + u32 support_additional_msix:1; + u32 support_fp_remote_lun:1; #else - u32 support_fp_remote_lun:1; - u32 support_additional_msix:1; - u32 support_fastpath_wb:1; - u32 support_max_255lds:1; - u32 support_ndrive_r1_lb:1; - u32 support_core_affinity:1; - u32 security_protocol_cmds_fw:1; - u32 support_ext_queue_depth:1; - u32 support_ext_io_size:1; - u32 support_vfid_in_ioframe:1; - u32 support_fp_rlbypass:1; - u32 support_qd_throttling:1; - u32 reserved:20; + u32 support_fp_remote_lun:1; + u32 support_additional_msix:1; + u32 support_fastpath_wb:1; + u32 support_max_255lds:1; + u32 support_ndrive_r1_lb:1; + u32 support_core_affinity:1; + u32 security_protocol_cmds_fw:1; + u32 support_ext_queue_depth:1; + u32 support_ext_io_size:1; + u32 support_vfid_in_ioframe:1; + u32 support_fp_rlbypass:1; + u32 support_qd_throttling:1; + u32 support_pd_map_target_id:1; + u32 reserved:19; #endif } mfi_capabilities; __le32 reg;
@@ -2055,6 +2105,7 @@ struct megasas_instance {u32 crash_dump_drv_support;u32 crash_dump_app_support;u32 secure_jbod_support; +u32 support_morethan256jbod;/* FW support for more than 256 PD/JBOD */ bool use_seqnum_jbod_fp;/* Added for PD sequence */ spinlock_t crashdump_lock;
drivers/scsi/megaraid/megaraid_sas_base.c +3 -0
@@ -4580,6 +4580,7 @@ static void megasas_update_ext_vd_details(struct megasas_instance *instance)le32_to_cpus ((u32 *)&ctrl_info->properties.OnOffProperties);le32_to_cpus ((u32 *)&ctrl_info->adapterOperations2);le32_to_cpus ((u32 *)&ctrl_info->adapterOperations3); +le16_to_cpus ((u16 *)&ctrl_info->adapter_operations4);/* Update the latest Ext VD info. * From Init path, store current firmware details.
@@ -4589,6 +4590,8 @@ static void megasas_update_ext_vd_details(struct megasas_instance *instance)megasas_update_ext_vd_details (instance); instance->use_seqnum_jbod_fp = ctrl_info->adapterOperations3.useSeqNumJbodFP; + instance->support_morethan256jbod = + ctrl_info->adapter_operations4.support_pd_map_target_id;/*Check whether controller is iMR or MR */ instance->is_imr = (ctrl_info->memory_size ?0 :1 );
drivers/scsi/megaraid/megaraid_sas_fusion.c +1 -0
@@ -864,6 +864,7 @@ static int megasas_create_sg_sense_fusion(struct megasas_instance *instance) drv_ops->mfi_capabilities.support_ext_queue_depth =1 ; drv_ops->mfi_capabilities.support_qd_throttling =1 ; + drv_ops->mfi_capabilities.support_pd_map_target_id =1 ;/* Convert capability to LE32 */ cpu_to_le32s ((u32 *)&init_frame->driver_operations.mfi_capabilities);
drivers/scsi/megaraid/megaraid_sas_fusion.h +2 -1
@@ -1189,7 +1189,8 @@ struct MR_PD_CFG_SEQ { u8 reserved:7;#endif } capability; -u8 reserved[3 ]; +u8 reserved; +u16 pd_target_id; } __packed;struct MR_PD_CFG_SEQ_NUM_SYNC {
Signature · 1 line
1.8.3.1
PATCH v3 11/11 megaraid_sas: driver version upgrade
In reply to Sasikumar ChandrasekaranUpgrade driver version.
This patch is depending on patch 10
--- drivers/scsi/megaraid/megaraid_sas.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +2 -2
@@ -35,8 +35,8 @@/* * MegaRAID SAS Driver meta data */ -#define MEGASAS_VERSION "06.812.07.00-rc1" -#define MEGASAS_RELDATE "August 22, 2016" +#define MEGASAS_VERSION "07.700.00.00-rc1" +#define MEGASAS_RELDATE "November 29, 2016"/* * Device IDs
Signature · 1 line
1.8.3.1
PATCH v3 6/11 megaraid_sas: Dynamic Raid Map Changes for SAS3.5 Generic Megaraid Controllers
In reply to Sasikumar ChandrasekaranSAS3.5 Generic Megaraid Controllers FW will support new dynamic RaidMap to have different sizes for different number of supported VDs.
This patch is depending on patch 5
--- drivers/scsi/megaraid/megaraid_sas.h | 7 + drivers/scsi/megaraid/megaraid_sas_base.c | 61 ++++-- drivers/scsi/megaraid/megaraid_sas_fp.c | 303 ++++++++++++++++++++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.c | 223 ++++++++++++++++---- drivers/scsi/megaraid/megaraid_sas_fusion.h | 240 ++++++++++++++++++---- 5 files changed, 699 insertions(+), 135 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +7 -0
@@ -1437,6 +1437,12 @@ enum FW_BOOT_CONTEXT {#define MR_MAX_REPLY_QUEUES_EXT_OFFSET_SHIFT 14#define MR_MAX_MSIX_REG_ARRAY 16#define MR_RDPQ_MODE_OFFSET 0X00800000 + +#define MR_MAX_RAID_MAP_SIZE_OFFSET_SHIFT 16 +#define MR_MAX_RAID_MAP_SIZE_MASK 0x1FF +#define MR_MIN_MAP_SIZE 0x10000 +/* 64k */ +#define MR_CAN_HANDLE_SYNC_CACHE_OFFSET 0X01000000/*
@@ -2155,6 +2161,7 @@ struct megasas_instance {bool fw_sync_cache_support;bool is_ventura;bool msix_combined; +u16 max_raid_mapsize; };struct MR_LD_VF_MAP {u32 size;
drivers/scsi/megaraid/megaraid_sas_base.c +44 -17
87 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fp.c +263 -40
399 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fusion.c +179 -44
409 lines not on this page · raw message
drivers/scsi/megaraid/megaraid_sas_fusion.h +206 -34
331 lines not on this page · raw message
Signature · 1 line
1.8.3.1
Tomas Henzl
NAKRe: [PATCH V3 01/11] megaraid_sas: Add new pci device Ids for SAS3.5 Generic Megaraid Controllers
In reply to Sasikumar ChandrasekaranQuoted 14 lines · Sasikumar Chandrasekaran
This patch contains new pci device ids for SAS3.5 Generic Megaraid Controllers
Signed-off-by Sasikumar Chandrasekaran <[email protected]>--- drivers/scsi/megaraid/megaraid_sas.h | 11 ++++++++++- drivers/scsi/megaraid/megaraid_sas_base.c | 20 ++++++++++++++++++- drivers/scsi/megaraid/megaraid_sas_fusion.c | 30 ++++++++++++++++++++++------- 3 files changed, 52 insertions(+), 9 deletions(-)drivers/scsi/megaraid/megaraid_sas.h +0
-0
drivers/scsi/megaraid/megaraid_sas.h line 61
Quoted 6 lines
drivers/scsi/megaraid/megaraid_sas.h +3
-0@@ -56,6 +56,14 @@#define PCI_DEVICE_ID_LSI_INTRUDER_24 0x00cf#define PCI_DEVICE_ID_LSI_CUTLASS_52 0x0052#define PCI_DEVICE_ID_LSI_CUTLASS_53 0x0053 +#define PCI_DEVICE_ID_LSI_MECTOR 0x00D4 +#define PCI_DEVICE_ID_LSI_VENTURA 0x0014 +#define PCI_DEVICE_ID_LSI_CRUSADER 0x0015
Nack.
This is not good, my test system panics instead of booting.megaraid_sas 0000:02:0e.0: RDPQ mode : (disabled)
BUG: unable to handle kernel paging request at 0000000000001e78 IP: [<ffffffffa0321321>] megasas_issue_init_mfi+0x171/0x270 [megaraid_sas]
you are already having a device with same device value in your pci_table (PCI_DEVICE_ID_DELL_PERC5 is also 0x15), so fix the switch in megasas_probe_one.
Cheers,
tomash
(when sending new fixed versions, please add to the changed patches a text explaining what was changed in which version, like so - www.spinics.net/lists/linux-scsi/msg102122.html)
Quoted 17 lines
drivers/scsi/megaraid/megaraid_sas.h +9
-0@@ -5723,6 +5732,15 @@ static int megasas_probe_one(struct pci_dev *pdev, instance->pdev = pdev;switch (instance->pdev->device) { +case PCI_DEVICE_ID_LSI_VENTURA : +case PCI_DEVICE_ID_LSI_MARLIN : +case PCI_DEVICE_ID_LSI_MECTOR : +case PCI_DEVICE_ID_LSI_CRUSADER : +case PCI_DEVICE_ID_LSI_HARPOON : +case PCI_DEVICE_ID_LSI_TOMCAT : +case PCI_DEVICE_ID_LSI_VENTURA_4PORT : +case PCI_DEVICE_ID_LSI_CRUSADER_4PORT : + instance->is_ventura = true;case PCI_DEVICE_ID_LSI_FUSION :case PCI_DEVICE_ID_LSI_PLASMA :case PCI_DEVICE_ID_LSI_INVADER :