scsi: qla2xxx: Add option for use reserve exch for ELS
authorQuinn Tran <quinn.tran@cavium.com>
Thu, 28 Dec 2017 20:33:19 +0000 (12:33 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Jan 2018 04:41:05 +0000 (23:41 -0500)
Add option to tell FW to reserve 1/2 of emergency exchanges for ELS.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_os.c

index cf1f1a3baf21c499b9a03724abbb51846df625f2..aabd49ef95a3a63fa4be99086ef67dcb522ad07f 100644 (file)
@@ -148,6 +148,7 @@ extern int ql2xuctrlirq;
 extern int ql2xnvmeenable;
 extern int ql2xautodetectsfp;
 extern int ql2xenablemsix;
+extern int qla2xuseresexchforels;
 
 extern int qla2x00_loop_reset(scsi_qla_host_t *);
 extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int);
index 728c66f34666ebc1f2af7ef55bfbb01143aba731..39d1edc6c2b19937eb7fc3abf74d09ec0df51fb1 100644 (file)
@@ -3348,6 +3348,12 @@ qla24xx_update_fw_options(scsi_qla_host_t *vha)
                        ha->fw_options[2] |= BIT_4;
                else
                        ha->fw_options[2] &= ~BIT_4;
+
+               /* Reserve 1/2 of emergency exchanges for ELS.*/
+               if (qla2xuseresexchforels)
+                       ha->fw_options[2] |= BIT_8;
+               else
+                       ha->fw_options[2] &= ~BIT_8;
        }
 
        ql_dbg(ql_dbg_init, vha, 0x00e8,
index e1761bd552fedbb0067fdb7210ebbbcc8d93c9dc..487e1affacf4543ed1cd3c1a05561ec3fc8e690c 100644 (file)
@@ -277,6 +277,12 @@ MODULE_PARM_DESC(ql2xenablemsix,
                 " 1 -- enable MSI-X interrupt mechanism.\n"
                 " 2 -- enable MSI interrupt mechanism.\n");
 
+int qla2xuseresexchforels;
+module_param(qla2xuseresexchforels, int, 0444);
+MODULE_PARM_DESC(qla2xuseresexchforels,
+                "Reserve 1/2 of emergency exchanges for ELS.\n"
+                " 0 (default): disabled");
+
 /*
  * SCSI host template entry points
  */