aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTej Parkash <tej.parkash@qlogic.com>2012-04-30 07:12:19 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-05-30 04:59:26 -0400
commitf7b4aa63650484e6ab11e8e00a6625fa57a67bd1 (patch)
tree0aaebf6b365ee6545b4a029a709948d34cf10bde /drivers/scsi
parent90599b62ca80a0d2f88aa88bc05bf8795731fab8 (diff)
[SCSI] qla4xxx: Add change_queue_depth API support
change_queue_depth will adjust device queuedepth upon receiving "SAM_STAT_TASK_SET_FULL" scsi status from the target. Also added ql4xqfulltracking command line param to enable or disable queuefull tracking. One can disabling queuefull tracking to ensure user set scsi device queuedepth is not altered. Signed-off-by: Tej Parkash <tej.parkash@qlogic.com> Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index 45144aa04433..f4ea58ee8673 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -68,6 +68,14 @@ MODULE_PARM_DESC(ql4xmaxqdepth,
68 " Maximum queue depth to report for target devices.\n" 68 " Maximum queue depth to report for target devices.\n"
69 "\t\t Default: 32."); 69 "\t\t Default: 32.");
70 70
71static int ql4xqfulltracking = 1;
72module_param(ql4xqfulltracking, int, S_IRUGO | S_IWUSR);
73MODULE_PARM_DESC(ql4xqfulltracking,
74 " Enable or disable dynamic tracking and adjustment of\n"
75 "\t\t scsi device queue depth.\n"
76 "\t\t 0 - Disable.\n"
77 "\t\t 1 - Enable. (Default)");
78
71static int ql4xsess_recovery_tmo = QL4_SESS_RECOVERY_TMO; 79static int ql4xsess_recovery_tmo = QL4_SESS_RECOVERY_TMO;
72module_param(ql4xsess_recovery_tmo, int, S_IRUGO); 80module_param(ql4xsess_recovery_tmo, int, S_IRUGO);
73MODULE_PARM_DESC(ql4xsess_recovery_tmo, 81MODULE_PARM_DESC(ql4xsess_recovery_tmo,
@@ -140,6 +148,8 @@ static int qla4xxx_slave_configure(struct scsi_device *device);
140static void qla4xxx_slave_destroy(struct scsi_device *sdev); 148static void qla4xxx_slave_destroy(struct scsi_device *sdev);
141static umode_t ql4_attr_is_visible(int param_type, int param); 149static umode_t ql4_attr_is_visible(int param_type, int param);
142static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type); 150static int qla4xxx_host_reset(struct Scsi_Host *shost, int reset_type);
151static int qla4xxx_change_queue_depth(struct scsi_device *sdev, int qdepth,
152 int reason);
143 153
144static struct qla4_8xxx_legacy_intr_set legacy_intr[] = 154static struct qla4_8xxx_legacy_intr_set legacy_intr[] =
145 QLA82XX_LEGACY_INTR_CONFIG; 155 QLA82XX_LEGACY_INTR_CONFIG;
@@ -159,6 +169,7 @@ static struct scsi_host_template qla4xxx_driver_template = {
159 .slave_configure = qla4xxx_slave_configure, 169 .slave_configure = qla4xxx_slave_configure,
160 .slave_alloc = qla4xxx_slave_alloc, 170 .slave_alloc = qla4xxx_slave_alloc,
161 .slave_destroy = qla4xxx_slave_destroy, 171 .slave_destroy = qla4xxx_slave_destroy,
172 .change_queue_depth = qla4xxx_change_queue_depth,
162 173
163 .this_id = -1, 174 .this_id = -1,
164 .cmd_per_lun = 3, 175 .cmd_per_lun = 3,
@@ -5251,6 +5262,15 @@ static void qla4xxx_slave_destroy(struct scsi_device *sdev)
5251 scsi_deactivate_tcq(sdev, 1); 5262 scsi_deactivate_tcq(sdev, 1);
5252} 5263}
5253 5264
5265static int qla4xxx_change_queue_depth(struct scsi_device *sdev, int qdepth,
5266 int reason)
5267{
5268 if (!ql4xqfulltracking)
5269 return -EOPNOTSUPP;
5270
5271 return iscsi_change_queue_depth(sdev, qdepth, reason);
5272}
5273
5254/** 5274/**
5255 * qla4xxx_del_from_active_array - returns an active srb 5275 * qla4xxx_del_from_active_array - returns an active srb
5256 * @ha: Pointer to host adapter structure. 5276 * @ha: Pointer to host adapter structure.