]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/libiscsi.c
Merge current mainline tree into linux-omap tree
[linux-2.6-omap-h63xx.git] / drivers / scsi / libiscsi.c
index 9c267b44044419c39a483f7e1a8ddafc3baf4f2b..299e075a7b34295f6a8ea8721270a329913a3244 100644 (file)
@@ -591,7 +591,7 @@ invalid_datalen:
                        goto out;
                }
 
-               senselen = be16_to_cpu(get_unaligned((__be16 *) data));
+               senselen = get_unaligned_be16(data);
                if (datalen < senselen)
                        goto invalid_datalen;
 
@@ -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