diff options
author | Quinn Tran <qutran@marvell.com> | 2019-07-26 09:07:29 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-07-30 16:12:02 -0400 |
commit | 178235f43ea142cf0f07dba67657494fcec21254 (patch) | |
tree | db6acf2bdf870d417fb7dae944dca2ec6c142d60 /drivers/scsi/qla2xxx | |
parent | 0c6df59061b23c7a951836d23977be34e896d3da (diff) | |
download | linux-178235f43ea142cf0f07dba67657494fcec21254.tar.bz2 |
scsi: qla2xxx: Use Correct index for Q-Pair array
For target mode, the default number of Q-Pairs allowed to use is 2. If the
number of Q-Pairs allocated is lower than the default Q-Pairs, then lower
value should be the set as default.
[mkp: typo]
Signed-off-by: Quinn Tran <qutran@marvell.com>
Signed-off-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/qla2xxx')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_target.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_target.c b/drivers/scsi/qla2xxx/qla_target.c index 1c1f63be6eed..d733e405c625 100644 --- a/drivers/scsi/qla2xxx/qla_target.c +++ b/drivers/scsi/qla2xxx/qla_target.c @@ -6671,6 +6671,8 @@ qlt_enable_vha(struct scsi_qla_host *vha) if (vha->qlini_mode == QLA2XXX_INI_MODE_ENABLED) return; + if (ha->tgt.num_act_qpairs > ha->max_qpairs) + ha->tgt.num_act_qpairs = ha->max_qpairs; spin_lock_irqsave(&ha->hardware_lock, flags); tgt->tgt_stopped = 0; qlt_set_mode(vha); |