Skip to contentSkip to conversation

megaraid_sas : Support for max_io_size 1MB

PATCH In review [email protected] 1 participant 1 message Aug 31, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 5/10 megaraid_sas : Support for max_io_size 1MB

Driver will expose max sge = 256 (earlier it was 64), if firmware support extended IO size upto 1M.

---
 drivers/scsi/megaraid/megaraid_sas.h        |    7 ++-
 drivers/scsi/megaraid/megaraid_sas_fusion.c |   61 ++++++++++++++++++++-------
 drivers/scsi/megaraid/megaraid_sas_fusion.h |   10 ++++-
 3 files changed, 58 insertions(+), 20 deletions(-)
drivers/scsi/megaraid/megaraid_sas.h +5 -2
index 811fc4a..5db31c6 100644
@@ -1239,7 +1239,8 @@ union megasas_sgl_frame {
 typedef union _MFI_CAPABILITIES {
 	struct {
 #if   defined(__BIG_ENDIAN_BITFIELD)
-		u32     reserved:24;
+		u32     reserved:23;
+		u32     support_ext_io_size:1;
 		u32	support_ext_queue_depth:1;
 		u32     security_protocol_cmds_fw:1;
 		u32     support_core_affinity:1;
@@ -1257,7 +1258,8 @@ typedef union _MFI_CAPABILITIES {
 		u32     support_core_affinity:1;
 		u32     security_protocol_cmds_fw:1;
 		u32	support_ext_queue_depth:1;
-		u32     reserved:24;
+		u32     support_ext_io_size:1;
+		u32     reserved:23;
 #endif
 	} mfi_capabilities;
 	__le32		reg;
@@ -1795,6 +1797,7 @@ struct megasas_instance {
 	char mpio;
 	u16 throttlequeuedepth;
 	u8 mask_interrupts;
+	u16 max_chain_frame_sz;
 	u8 is_imr;
 	bool dev_handle;
 };
drivers/scsi/megaraid/megaraid_sas_fusion.c +45 -16

127 lines not on this page · raw message

drivers/scsi/megaraid/megaraid_sas_fusion.h +8 -2
index 41f3d8b..7d89c1c 100644
@@ -35,8 +35,13 @@
 #define _MEGARAID_SAS_FUSION_H_
 
 /* Fusion defines */
-#define MEGASAS_MAX_SZ_CHAIN_FRAME 1024
+#define MEGASAS_CHAIN_FRAME_SZ_MIN 1024
 #define MFI_FUSION_ENABLE_INTERRUPT_MASK (0x00000009)
+#define MEGASAS_MAX_CHAIN_SHIFT			5
+#define MEGASAS_MAX_CHAIN_SIZE_UNITS_MASK	0x400000
+#define MEGASAS_MAX_CHAIN_SIZE_MASK		0x3E0
+#define MEGASAS_256K_IO				128
+#define MEGASAS_1MB_IO				(MEGASAS_256K_IO * 4)
 #define MEGA_MPI2_RAID_DEFAULT_IO_FRAME_SIZE 256
 #define MEGASAS_MPI2_FUNCTION_PASSTHRU_IO_REQUEST   0xF0
 #define MEGASAS_MPI2_FUNCTION_LD_IO_REQUEST         0xF1
@@ -119,7 +124,8 @@ struct RAID_CONTEXT {
 	__le16	configSeqNum;
 	u8      spanArm;
 	u8      priority;
-	u8      resvd2[2];
+	u8	numSGEExt;
+	u8      resvd2;
 };
 
 #define RAID_CTX_SPANARM_ARM_SHIFT	(0)
Signature · 1 line
1.7.1