[SCSI] mptsas : set max_id to infinite value.
authorKashyap, Desai <kashyap.desai@lsi.com>
Wed, 5 Aug 2009 07:22:58 +0000 (12:52 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Sat, 22 Aug 2009 22:52:26 +0000 (17:52 -0500)
Do not set max_id value received from FW. Once SAS transport layer is
introduced max_id value is missleading to SCSI mid layer. Use max_id to
infinite value.

logic of can queue of scsi host is changed.

Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/message/fusion/mptsas.c
drivers/message/fusion/mptscsih.c

index 936e35a..21bd78e 100644 (file)
@@ -4761,10 +4761,9 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
        /* set 16 byte cdb's */
        sh->max_cmd_len = 16;
-
-       sh->max_id = ioc->pfacts[0].PortSCSIID;
+       sh->can_queue = min_t(int, ioc->req_depth - 10, sh->can_queue);
+       sh->max_id = -1;
        sh->max_lun = max_lun;
-
        sh->transportt = mptsas_transport_template;
 
        /* Required entry.
index 1466a5a..0e402eb 100644 (file)
@@ -2290,7 +2290,10 @@ mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
                else
                        max_depth = MPT_SCSI_CMD_PER_DEV_LOW;
        } else
-               max_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
+                max_depth = ioc->sh->can_queue;
+
+       if (!sdev->tagged_supported)
+               max_depth = 1;
 
        if (qdepth > max_depth)
                qdepth = max_depth;