diff options
author | Quinn Tran <quinn.tran@cavium.com> | 2018-09-11 19:18:18 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-09-12 02:28:09 +0200 |
commit | 0645cb8350cdb60bfbf91caa722984b81c215add (patch) | |
tree | 7754355b9f73f0e401eaa010da7a222486660d8d /drivers/scsi/qla2xxx/qla_gbl.h | |
parent | scsi: qla2xxx: Fix race condition for resource cleanup (diff) | |
download | linux-0645cb8350cdb60bfbf91caa722984b81c215add.tar.xz linux-0645cb8350cdb60bfbf91caa722984b81c215add.zip |
scsi: qla2xxx: Add mode control for each physical port
Add ability to allow each physical port to control operating mode. Current
code forces all ports to behave in one mode (i.e. initiator, target or
dual). This patch allows user to select the operating mode for each port.
- Driver must be loaded in dual mode to allow resource allocation
modprobe qla2xxx qlini_mode=dual
- In addition user can make adjustment to exchange resources using following
command
echo 1024 > /sys/class/scsi_host/host<x>/ql2xiniexchg
echo 1024 > /sys/class/scsi_host/host<x>/ql2xexchoffld
- trigger mode change and new setting of ql2xexchoffld|ql2xiniexchg
echo [<value>] > /sys/class/scsi_host/host<x>/qlini_mode
where, value can be one of following
- enabled
- disabled
- dual
- exclusive
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>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_gbl.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_gbl.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index 7018067b5707..3673fcdb033a 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -159,6 +159,7 @@ extern int ql2xnvmeenable; extern int ql2xautodetectsfp; extern int ql2xenablemsix; extern int qla2xuseresexchforels; +extern int ql2xexlogins; extern int qla2x00_loop_reset(scsi_qla_host_t *); extern void qla2x00_abort_all_cmds(scsi_qla_host_t *, int); @@ -675,6 +676,7 @@ void qla_scan_work_fn(struct work_struct *); */ struct device_attribute; extern struct device_attribute *qla2x00_host_attrs[]; +extern struct device_attribute *qla2x00_host_attrs_dm[]; struct fc_function_template; extern struct fc_function_template qla2xxx_transport_functions; extern struct fc_function_template qla2xxx_transport_vport_functions; @@ -688,7 +690,7 @@ extern int qla2x00_echo_test(scsi_qla_host_t *, extern int qla24xx_update_all_fcp_prio(scsi_qla_host_t *); extern int qla24xx_fcp_prio_cfg_valid(scsi_qla_host_t *, struct qla_fcp_prio_cfg *, uint8_t); - +void qla_insert_tgt_attrs(void); /* * Global Function Prototypes in qla_dfs.c source file. */ @@ -895,5 +897,6 @@ void qlt_unknown_atio_work_fn(struct work_struct *); void qlt_update_host_map(struct scsi_qla_host *, port_id_t); void qlt_remove_target_resources(struct qla_hw_data *); void qlt_clr_qp_table(struct scsi_qla_host *vha); +void qlt_set_mode(struct scsi_qla_host *); #endif /* _QLA_GBL_H */ |