summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2008-02-26 19:35:23 +0100
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-28 00:52:46 +0100
commit31ed0bf439a15363c28c7a239f52eb127cb6feb3 (patch)
treef7d49cc36f8d1852afc7f3b5027a1a2bff269534 /drivers/scsi/libiscsi.c
parent[SCSI] aic94xx: fix TMF ascb handling to prevent sequencer panic (diff)
downloadlinux-31ed0bf439a15363c28c7a239f52eb127cb6feb3.tar.xz
linux-31ed0bf439a15363c28c7a239f52eb127cb6feb3.zip
[SCSI] iscsi regression: check for zero max session cmds
The old tools did not set max session cmds. This is a regression. I removed the check when merging the power of 2 patch. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r--drivers/scsi/libiscsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 59f8445eab0d..bdd7de7da39a 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1708,8 +1708,8 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
qdepth = ISCSI_DEF_CMD_PER_LUN;
}
- if (!is_power_of_2(cmds_max) ||
- cmds_max >= ISCSI_MGMT_ITT_OFFSET) {
+ if (!is_power_of_2(cmds_max) || cmds_max >= ISCSI_MGMT_ITT_OFFSET ||
+ cmds_max < 2) {
if (cmds_max != 0)
printk(KERN_ERR "iscsi: invalid can_queue of %d. "
"can_queue must be a power of 2 and between "