aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2013-01-03 15:43:03 -0500
committerJames Bottomley <JBottomley@Parallels.com>2013-01-29 19:00:53 -0500
commitfe8f7f9ced25f97bb77c4502b75e75210bf8aa1d (patch)
tree80ee5a82d719075c1f6dbf7598f922e4274c216e
parent70233ac51b027f20d990f02e647cb195b7b644ce (diff)
[SCSI] lpfc 8.3.37: Provide support for change_queue_type
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index 60e5a177644c..98af07c6e300 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -288,6 +288,26 @@ lpfc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason)
288} 288}
289 289
290/** 290/**
291 * lpfc_change_queue_type() - Change a device's scsi tag queuing type
292 * @sdev: Pointer the scsi device whose queue depth is to change
293 * @tag_type: Identifier for queue tag type
294 */
295static int
296lpfc_change_queue_type(struct scsi_device *sdev, int tag_type)
297{
298 if (sdev->tagged_supported) {
299 scsi_set_tag_type(sdev, tag_type);
300 if (tag_type)
301 scsi_activate_tcq(sdev, sdev->queue_depth);
302 else
303 scsi_deactivate_tcq(sdev, sdev->queue_depth);
304 } else
305 tag_type = 0;
306
307 return tag_type;
308}
309
310/**
291 * lpfc_rampdown_queue_depth - Post RAMP_DOWN_QUEUE event to worker thread 311 * lpfc_rampdown_queue_depth - Post RAMP_DOWN_QUEUE event to worker thread
292 * @phba: The Hba for which this call is being executed. 312 * @phba: The Hba for which this call is being executed.
293 * 313 *
@@ -3972,7 +3992,7 @@ lpfc_scsi_prep_cmnd(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
3972 break; 3992 break;
3973 } 3993 }
3974 } else 3994 } else
3975 fcp_cmnd->fcpCntl1 = 0; 3995 fcp_cmnd->fcpCntl1 = SIMPLE_Q;
3976 3996
3977 sli4 = (phba->sli_rev == LPFC_SLI_REV4); 3997 sli4 = (phba->sli_rev == LPFC_SLI_REV4);
3978 3998
@@ -5150,6 +5170,7 @@ struct scsi_host_template lpfc_template = {
5150 .max_sectors = 0xFFFF, 5170 .max_sectors = 0xFFFF,
5151 .vendor_id = LPFC_NL_VENDOR_ID, 5171 .vendor_id = LPFC_NL_VENDOR_ID,
5152 .change_queue_depth = lpfc_change_queue_depth, 5172 .change_queue_depth = lpfc_change_queue_depth,
5173 .change_queue_type = lpfc_change_queue_type,
5153}; 5174};
5154 5175
5155struct scsi_host_template lpfc_vport_template = { 5176struct scsi_host_template lpfc_vport_template = {
@@ -5172,4 +5193,5 @@ struct scsi_host_template lpfc_vport_template = {
5172 .shost_attrs = lpfc_vport_attrs, 5193 .shost_attrs = lpfc_vport_attrs,
5173 .max_sectors = 0xFFFF, 5194 .max_sectors = 0xFFFF,
5174 .change_queue_depth = lpfc_change_queue_depth, 5195 .change_queue_depth = lpfc_change_queue_depth,
5196 .change_queue_type = lpfc_change_queue_type,
5175}; 5197};