aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorJames Smart <james.smart@broadcom.com>2016-07-06 15:36:09 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2016-07-15 15:25:06 -0400
commit12247e8101eacfda790a14944c34bdccb6e90d6b (patch)
treee9e743a84de015c7e13e358ca5176ec1d0a2ef42 /drivers/scsi
parent8eb8b960fd0593baaddd1c01cbff6b85c5056ccf (diff)
lpfc: Remove global lpfc_sli_mode attribute in leiu of per-hba lpfc_sli_mode
Remove global lpfc_sli_mode attribute in leiu of per-hba lpfc_sli_mode Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/lpfc/lpfc.h1
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c12
-rw-r--r--drivers/scsi/lpfc/lpfc_crtn.h1
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c12
4 files changed, 13 insertions, 13 deletions
diff --git a/drivers/scsi/lpfc/lpfc.h b/drivers/scsi/lpfc/lpfc.h
index 82d7b115b650..4d9f1b189659 100644
--- a/drivers/scsi/lpfc/lpfc.h
+++ b/drivers/scsi/lpfc/lpfc.h
@@ -755,6 +755,7 @@ struct lpfc_hba {
755 uint32_t cfg_suppress_link_up; 755 uint32_t cfg_suppress_link_up;
756 uint32_t cfg_rrq_xri_bitmap_sz; 756 uint32_t cfg_rrq_xri_bitmap_sz;
757 uint32_t cfg_delay_discovery; 757 uint32_t cfg_delay_discovery;
758 uint32_t cfg_sli_mode;
758#define LPFC_INITIALIZE_LINK 0 /* do normal init_link mbox */ 759#define LPFC_INITIALIZE_LINK 0 /* do normal init_link mbox */
759#define LPFC_DELAY_INIT_LINK 1 /* layered driver hold off */ 760#define LPFC_DELAY_INIT_LINK 1 /* layered driver hold off */
760#define LPFC_DELAY_INIT_LINK_INDEFINITELY 2 /* wait, manual intervention */ 761#define LPFC_DELAY_INIT_LINK_INDEFINITELY 2 /* wait, manual intervention */
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index f5abcea49730..07d80336dfc0 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -2837,12 +2837,11 @@ MODULE_PARM_DESC(lpfc_poll, "FCP ring polling mode control:"
2837static DEVICE_ATTR(lpfc_poll, S_IRUGO | S_IWUSR, 2837static DEVICE_ATTR(lpfc_poll, S_IRUGO | S_IWUSR,
2838 lpfc_poll_show, lpfc_poll_store); 2838 lpfc_poll_show, lpfc_poll_store);
2839 2839
2840int lpfc_sli_mode = 0; 2840LPFC_ATTR(sli_mode, 0, 0, 3,
2841module_param(lpfc_sli_mode, int, S_IRUGO); 2841 "SLI mode selector:"
2842MODULE_PARM_DESC(lpfc_sli_mode, "SLI mode selector:" 2842 " 0 - auto (SLI-3 if supported),"
2843 " 0 - auto (SLI-3 if supported)," 2843 " 2 - select SLI-2 even on SLI-3 capable HBAs,"
2844 " 2 - select SLI-2 even on SLI-3 capable HBAs," 2844 " 3 - select SLI-3");
2845 " 3 - select SLI-3");
2846 2845
2847LPFC_ATTR_R(enable_npiv, 1, 0, 1, 2846LPFC_ATTR_R(enable_npiv, 1, 0, 1,
2848 "Enable NPIV functionality"); 2847 "Enable NPIV functionality");
@@ -5936,6 +5935,7 @@ lpfc_get_cfgparam(struct lpfc_hba *phba)
5936 lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up); 5935 lpfc_suppress_link_up_init(phba, lpfc_suppress_link_up);
5937 lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt); 5936 lpfc_iocb_cnt_init(phba, lpfc_iocb_cnt);
5938 lpfc_delay_discovery_init(phba, lpfc_delay_discovery); 5937 lpfc_delay_discovery_init(phba, lpfc_delay_discovery);
5938 lpfc_sli_mode_init(phba, lpfc_sli_mode);
5939 phba->cfg_enable_dss = 1; 5939 phba->cfg_enable_dss = 1;
5940 lpfc_enable_mds_diags_init(phba, lpfc_enable_mds_diags); 5940 lpfc_enable_mds_diags_init(phba, lpfc_enable_mds_diags);
5941 return; 5941 return;
diff --git a/drivers/scsi/lpfc/lpfc_crtn.h b/drivers/scsi/lpfc/lpfc_crtn.h
index 9f075db51099..3a5a02e36950 100644
--- a/drivers/scsi/lpfc/lpfc_crtn.h
+++ b/drivers/scsi/lpfc/lpfc_crtn.h
@@ -359,7 +359,6 @@ extern struct scsi_host_template lpfc_template_s3;
359extern struct scsi_host_template lpfc_vport_template; 359extern struct scsi_host_template lpfc_vport_template;
360extern struct fc_function_template lpfc_transport_functions; 360extern struct fc_function_template lpfc_transport_functions;
361extern struct fc_function_template lpfc_vport_transport_functions; 361extern struct fc_function_template lpfc_vport_transport_functions;
362extern int lpfc_sli_mode;
363 362
364int lpfc_vport_symbolic_node_name(struct lpfc_vport *, char *, size_t); 363int lpfc_vport_symbolic_node_name(struct lpfc_vport *, char *, size_t);
365int lpfc_vport_symbolic_port_name(struct lpfc_vport *, char *, size_t); 364int lpfc_vport_symbolic_port_name(struct lpfc_vport *, char *, size_t);
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 53ed6c534f82..c8fd0a349eba 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -4665,13 +4665,13 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba)
4665 int mode = 3, i; 4665 int mode = 3, i;
4666 int longs; 4666 int longs;
4667 4667
4668 switch (lpfc_sli_mode) { 4668 switch (phba->cfg_sli_mode) {
4669 case 2: 4669 case 2:
4670 if (phba->cfg_enable_npiv) { 4670 if (phba->cfg_enable_npiv) {
4671 lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, 4671 lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT,
4672 "1824 NPIV enabled: Override lpfc_sli_mode " 4672 "1824 NPIV enabled: Override sli_mode "
4673 "parameter (%d) to auto (0).\n", 4673 "parameter (%d) to auto (0).\n",
4674 lpfc_sli_mode); 4674 phba->cfg_sli_mode);
4675 break; 4675 break;
4676 } 4676 }
4677 mode = 2; 4677 mode = 2;
@@ -4681,8 +4681,8 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba)
4681 break; 4681 break;
4682 default: 4682 default:
4683 lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, 4683 lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT,
4684 "1819 Unrecognized lpfc_sli_mode " 4684 "1819 Unrecognized sli_mode parameter: %d.\n",
4685 "parameter: %d.\n", lpfc_sli_mode); 4685 phba->cfg_sli_mode);
4686 4686
4687 break; 4687 break;
4688 } 4688 }
@@ -4690,7 +4690,7 @@ lpfc_sli_hba_setup(struct lpfc_hba *phba)
4690 4690
4691 rc = lpfc_sli_config_port(phba, mode); 4691 rc = lpfc_sli_config_port(phba, mode);
4692 4692
4693 if (rc && lpfc_sli_mode == 3) 4693 if (rc && phba->cfg_sli_mode == 3)
4694 lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT, 4694 lpfc_printf_log(phba, KERN_ERR, LOG_INIT | LOG_VPORT,
4695 "1820 Unable to select SLI-3. " 4695 "1820 Unable to select SLI-3. "
4696 "Not supported by adapter.\n"); 4696 "Not supported by adapter.\n");