diff options
author | Quinn Tran <quinn.tran@cavium.com> | 2018-09-11 10:18:18 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2018-09-11 20:28:09 -0400 |
commit | 0645cb8350cdb60bfbf91caa722984b81c215add (patch) | |
tree | 7754355b9f73f0e401eaa010da7a222486660d8d /drivers/scsi/qla2xxx/qla_inline.h | |
parent | 0e324e949ecd42f2700004469d22c1733a7abbd8 (diff) |
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_inline.h')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_inline.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index bf9a6f01fd9f..512c3c37b447 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -318,13 +318,13 @@ static inline bool qla_is_exch_offld_enabled(struct scsi_qla_host *vha) { if (qla_ini_mode_enabled(vha) && - (ql2xiniexchg > FW_DEF_EXCHANGES_CNT)) + (vha->ql2xiniexchg > FW_DEF_EXCHANGES_CNT)) return true; else if (qla_tgt_mode_enabled(vha) && - (ql2xexchoffld > FW_DEF_EXCHANGES_CNT)) + (vha->ql2xexchoffld > FW_DEF_EXCHANGES_CNT)) return true; else if (qla_dual_mode_enabled(vha) && - ((ql2xiniexchg + ql2xexchoffld) > FW_DEF_EXCHANGES_CNT)) + ((vha->ql2xiniexchg + vha->ql2xexchoffld) > FW_DEF_EXCHANGES_CNT)) return true; else return false; |