[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>
This commit is contained in:
parent
5c20848a09
commit
14caf44c69
|
@ -137,7 +137,7 @@ static struct scsi_host_template fcoe_shost_template = {
|
||||||
.change_queue_depth = fc_change_queue_depth,
|
.change_queue_depth = fc_change_queue_depth,
|
||||||
.change_queue_type = fc_change_queue_type,
|
.change_queue_type = fc_change_queue_type,
|
||||||
.this_id = -1,
|
.this_id = -1,
|
||||||
.cmd_per_lun = 32,
|
.cmd_per_lun = 3,
|
||||||
.can_queue = FCOE_MAX_OUTSTANDING_COMMANDS,
|
.can_queue = FCOE_MAX_OUTSTANDING_COMMANDS,
|
||||||
.use_clustering = ENABLE_CLUSTERING,
|
.use_clustering = ENABLE_CLUSTERING,
|
||||||
.sg_tablesize = SG_ALL,
|
.sg_tablesize = SG_ALL,
|
||||||
|
|
|
@ -2033,18 +2033,16 @@ EXPORT_SYMBOL(fc_eh_host_reset);
|
||||||
int fc_slave_alloc(struct scsi_device *sdev)
|
int fc_slave_alloc(struct scsi_device *sdev)
|
||||||
{
|
{
|
||||||
struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
|
struct fc_rport *rport = starget_to_rport(scsi_target(sdev));
|
||||||
int queue_depth;
|
|
||||||
|
|
||||||
if (!rport || fc_remote_port_chkready(rport))
|
if (!rport || fc_remote_port_chkready(rport))
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
if (sdev->tagged_supported) {
|
if (sdev->tagged_supported)
|
||||||
if (sdev->host->hostt->cmd_per_lun)
|
scsi_activate_tcq(sdev, FC_FCP_DFLT_QUEUE_DEPTH);
|
||||||
queue_depth = sdev->host->hostt->cmd_per_lun;
|
else
|
||||||
else
|
scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev),
|
||||||
queue_depth = FC_FCP_DFLT_QUEUE_DEPTH;
|
FC_FCP_DFLT_QUEUE_DEPTH);
|
||||||
scsi_activate_tcq(sdev, queue_depth);
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(fc_slave_alloc);
|
EXPORT_SYMBOL(fc_slave_alloc);
|
||||||
|
|
Loading…
Reference in New Issue