X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fscsi%2Flibiscsi.c;h=299e075a7b34295f6a8ea8721270a329913a3244;hb=04489eeb02a40bc15029886cef7285ada3ab0de6;hp=8b4e412a0974345762008ab40ca5b61bc29fd446;hpb=8f333991ba8479fe8a9d72aea978db415e3c2f2a;p=linux-2.6 diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 8b4e412a09..299e075a7b 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c @@ -1857,6 +1857,9 @@ EXPORT_SYMBOL_GPL(iscsi_pool_free); */ int iscsi_host_add(struct Scsi_Host *shost, struct device *pdev) { + if (!shost->can_queue) + shost->can_queue = ISCSI_DEF_XMIT_CMDS_MAX; + return scsi_add_host(shost, pdev); } EXPORT_SYMBOL_GPL(iscsi_host_add); @@ -1942,6 +1945,9 @@ iscsi_session_setup(struct iscsi_transport *iscsit, struct Scsi_Host *shost, struct iscsi_session *session; struct iscsi_cls_session *cls_session; int cmd_i, scsi_cmds, total_cmds = cmds_max; + + if (!total_cmds) + total_cmds = ISCSI_DEF_XMIT_CMDS_MAX; /* * The iscsi layer needs some tasks for nop handling and tmfs, * so the cmds_max must at least be greater than ISCSI_MGMT_CMDS_MAX