aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/libiscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/libiscsi.c')
-rw-r--r--drivers/scsi/libiscsi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c
index 8b4e412a0974..299e075a7b34 100644
--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -1857,6 +1857,9 @@ EXPORT_SYMBOL_GPL(iscsi_pool_free);
1857 */ 1857 */
1858int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev) 1858int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev)
1859{ 1859{
1860 if (!shost->can_queue)
1861 shost->can_queue = ISCSI_DEF_XMIT_CMDS_MAX;
1862
1860 return scsi_add_host(shost, pdev); 1863 return scsi_add_host(shost, pdev);
1861} 1864}
1862EXPORT_SYMBOL_GPL(iscsi_host_add); 1865EXPORT_SYMBOL_GPL(iscsi_host_add);
@@ -1942,6 +1945,9 @@ iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost,
1942 struct iscsi_session *session; 1945 struct iscsi_session *session;
1943 struct iscsi_cls_session *cls_session; 1946 struct iscsi_cls_session *cls_session;
1944 int cmd_i, scsi_cmds, total_cmds = cmds_max; 1947 int cmd_i, scsi_cmds, total_cmds = cmds_max;
1948
1949 if (!total_cmds)
1950 total_cmds = ISCSI_DEF_XMIT_CMDS_MAX;
1945 /* 1951 /*
1946 * The iscsi layer needs some tasks for nop handling and tmfs, 1952 * The iscsi layer needs some tasks for nop handling and tmfs,
1947 * so the cmds_max must at least be greater than ISCSI_MGMT_CMDS_MAX 1953 * so the cmds_max must at least be greater than ISCSI_MGMT_CMDS_MAX