[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>
This commit is contained in:
Mike Christie 2008-02-26 12:35:23 -06:00 committed by James Bottomley
parent e2396f1e4e
commit 31ed0bf439
2 changed files with 3 additions and 3 deletions

View file

@ -1708,8 +1708,8 @@ iscsi_session_setup(struct iscsi_transport *iscsit,
qdepth = ISCSI_DEF_CMD_PER_LUN; qdepth = ISCSI_DEF_CMD_PER_LUN;
} }
if (!is_power_of_2(cmds_max) || if (!is_power_of_2(cmds_max) || cmds_max >= ISCSI_MGMT_ITT_OFFSET ||
cmds_max >= ISCSI_MGMT_ITT_OFFSET) { cmds_max < 2) {
if (cmds_max != 0) if (cmds_max != 0)
printk(KERN_ERR "iscsi: invalid can_queue of %d. " printk(KERN_ERR "iscsi: invalid can_queue of %d. "
"can_queue must be a power of 2 and between " "can_queue must be a power of 2 and between "

View file

@ -33,7 +33,7 @@
#define ISCSI_SESSION_ATTRS 19 #define ISCSI_SESSION_ATTRS 19
#define ISCSI_CONN_ATTRS 13 #define ISCSI_CONN_ATTRS 13
#define ISCSI_HOST_ATTRS 4 #define ISCSI_HOST_ATTRS 4
#define ISCSI_TRANSPORT_VERSION "2.0-868" #define ISCSI_TRANSPORT_VERSION "2.0-869"
struct iscsi_internal { struct iscsi_internal {
int daemon_pid; int daemon_pid;