]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/hosts.c
[SCSI] don't use __GFP_DMA for sense buffers if not required
[linux-2.6-omap-h63xx.git] / drivers / scsi / hosts.c
index 96bc31266c98a258aefbcbd6ff54fde95f80a560..9a10b4335e76cd7cda2a44bbac686a9be2bf757d 100644 (file)
@@ -54,8 +54,7 @@ static struct class shost_class = {
 };
 
 /**
- *     scsi_host_set_state - Take the given host through the host
- *             state model.
+ *     scsi_host_set_state - Take the given host through the host state model.
  *     @shost: scsi host to change the state of.
  *     @state: state to change to.
  *
@@ -342,6 +341,14 @@ struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
        shost->unchecked_isa_dma = sht->unchecked_isa_dma;
        shost->use_clustering = sht->use_clustering;
        shost->ordered_tag = sht->ordered_tag;
+       shost->active_mode = sht->supported_mode;
+       shost->use_sg_chaining = sht->use_sg_chaining;
+
+       if (sht->supported_mode == MODE_UNKNOWN)
+               /* means we didn't set it ... default to INITIATOR */
+               shost->active_mode = MODE_INITIATOR;
+       else
+               shost->active_mode = sht->supported_mode;
 
        if (sht->max_host_blocked)
                shost->max_host_blocked = sht->max_host_blocked;
@@ -423,7 +430,6 @@ EXPORT_SYMBOL(scsi_unregister);
 
 /**
  * scsi_host_lookup - get a reference to a Scsi_Host by host no
- *
  * @hostnum:   host number to locate
  *
  * Return value: