diff options
author | Vasu Dev <vasu.dev@intel.com> | 2009-10-15 20:46:55 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 13:00:43 -0500 |
commit | 14caf44c69184ed72d46a2f883311daf27a4192f (patch) | |
tree | cdfdf95ea884116de6595cc8d89482b89ba8ccaa /drivers/scsi/libfc | |
parent | 5c20848a096fb1880ded99816be79d78ca1cd696 (diff) |
[SCSI] fcoe, libfc: fix an libfc issue with queue ramp down in libfc
The cmd_per_lun value is used by scsi-ml as fall back lowest
queue_depth value but in case of libfc cmd_per_lun is set to
same value as max queue_depth = 32.
So this patch reduces cmd_per_lun value to 3 and configures
each lun with default max queue_depth 32 in fc_slave_alloc.
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Acked-by: Robert Love <robert.w.love@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/libfc')
-rw-r--r-- | drivers/scsi/libfc/fc_fcp.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/scsi/libfc/fc_fcp.c b/drivers/scsi/libfc/fc_fcp.c index c0dc8e151c65..48de805eb193 100644 --- a/drivers/scsi/libfc/fc_fcp.c +++ b/drivers/scsi/libfc/fc_fcp.c | |||
@@ -2033,18 +2033,16 @@ EXPORT_SYMBOL(fc_eh_host_reset); | |||
2033 | int fc_slave_alloc(struct scsi_device *sdev) | 2033 | int fc_slave_alloc(struct scsi_device *sdev) |
2034 | { | 2034 | { |
2035 | struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); | 2035 | struct fc_rport *rport = starget_to_rport(scsi_target(sdev)); |
2036 | int queue_depth; | ||
2037 | 2036 | ||
2038 | if (!rport || fc_remote_port_chkready(rport)) | 2037 | if (!rport || fc_remote_port_chkready(rport)) |
2039 | return -ENXIO; | 2038 | return -ENXIO; |
2040 | 2039 | ||
2041 | if (sdev->tagged_supported) { | 2040 | if (sdev->tagged_supported) |
2042 | if (sdev->host->hostt->cmd_per_lun) | 2041 | scsi_activate_tcq(sdev, FC_FCP_DFLT_QUEUE_DEPTH); |
2043 | queue_depth = sdev->host->hostt->cmd_per_lun; | 2042 | else |
2044 | else | 2043 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), |
2045 | queue_depth = FC_FCP_DFLT_QUEUE_DEPTH; | 2044 | FC_FCP_DFLT_QUEUE_DEPTH); |
2046 | scsi_activate_tcq(sdev, queue_depth); | 2045 | |
2047 | } | ||
2048 | return 0; | 2046 | return 0; |
2049 | } | 2047 | } |
2050 | EXPORT_SYMBOL(fc_slave_alloc); | 2048 | EXPORT_SYMBOL(fc_slave_alloc); |