diff options
author | Giridhar Malavali <giridhar.malavali@qlogic.com> | 2009-12-02 13:36:54 -0500 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-10 09:54:18 -0500 |
commit | c45dd30551c371cb1e7a742136b8b36f6aba63f8 (patch) | |
tree | aaeb5ed7563dfd6d562393b4ba0eba5c7149cb95 /drivers/scsi/qla2xxx/qla_os.c | |
parent | 1486400f7edd009d49550da968d5744e246dc7f8 (diff) |
[SCSI] qla2xxx: Queue depth ramp up/down modification changes.
Removed the module parameters ql2xqfulltracking and ql2xqfullrampup
since the queue depth ramp up/down functionality is moved to scsi-ml.
Signed-off-by: Giridhar Malavali <giridhar.malavali@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 69 |
1 files changed, 51 insertions, 18 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 58edc0deb74b..2f873d237325 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -78,21 +78,6 @@ module_param(ql2xmaxqdepth, int, S_IRUGO|S_IWUSR); | |||
78 | MODULE_PARM_DESC(ql2xmaxqdepth, | 78 | MODULE_PARM_DESC(ql2xmaxqdepth, |
79 | "Maximum queue depth to report for target devices."); | 79 | "Maximum queue depth to report for target devices."); |
80 | 80 | ||
81 | int ql2xqfulltracking = 1; | ||
82 | module_param(ql2xqfulltracking, int, S_IRUGO|S_IWUSR); | ||
83 | MODULE_PARM_DESC(ql2xqfulltracking, | ||
84 | "Controls whether the driver tracks queue full status " | ||
85 | "returns and dynamically adjusts a scsi device's queue " | ||
86 | "depth. Default is 1, perform tracking. Set to 0 to " | ||
87 | "disable dynamic tracking and adjustment of queue depth."); | ||
88 | |||
89 | int ql2xqfullrampup = 120; | ||
90 | module_param(ql2xqfullrampup, int, S_IRUGO|S_IWUSR); | ||
91 | MODULE_PARM_DESC(ql2xqfullrampup, | ||
92 | "Number of seconds to wait to begin to ramp-up the queue " | ||
93 | "depth for a device after a queue-full condition has been " | ||
94 | "detected. Default is 120 seconds."); | ||
95 | |||
96 | int ql2xiidmaenable=1; | 81 | int ql2xiidmaenable=1; |
97 | module_param(ql2xiidmaenable, int, S_IRUGO|S_IRUSR); | 82 | module_param(ql2xiidmaenable, int, S_IRUGO|S_IRUSR); |
98 | MODULE_PARM_DESC(ql2xiidmaenable, | 83 | MODULE_PARM_DESC(ql2xiidmaenable, |
@@ -1217,13 +1202,61 @@ qla2xxx_slave_destroy(struct scsi_device *sdev) | |||
1217 | sdev->hostdata = NULL; | 1202 | sdev->hostdata = NULL; |
1218 | } | 1203 | } |
1219 | 1204 | ||
1205 | static void qla2x00_handle_queue_full(struct scsi_device *sdev, int qdepth) | ||
1206 | { | ||
1207 | fc_port_t *fcport = (struct fc_port *) sdev->hostdata; | ||
1208 | |||
1209 | if (!scsi_track_queue_full(sdev, qdepth)) | ||
1210 | return; | ||
1211 | |||
1212 | DEBUG2(qla_printk(KERN_INFO, fcport->vha->hw, | ||
1213 | "scsi(%ld:%d:%d:%d): Queue depth adjusted-down to %d.\n", | ||
1214 | fcport->vha->host_no, sdev->channel, sdev->id, sdev->lun, | ||
1215 | sdev->queue_depth)); | ||
1216 | } | ||
1217 | |||
1218 | static void qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, int qdepth) | ||
1219 | { | ||
1220 | fc_port_t *fcport = sdev->hostdata; | ||
1221 | struct scsi_qla_host *vha = fcport->vha; | ||
1222 | struct qla_hw_data *ha = vha->hw; | ||
1223 | struct req_que *req = NULL; | ||
1224 | |||
1225 | req = vha->req; | ||
1226 | if (!req) | ||
1227 | return; | ||
1228 | |||
1229 | if (req->max_q_depth <= sdev->queue_depth || req->max_q_depth < qdepth) | ||
1230 | return; | ||
1231 | |||
1232 | if (sdev->ordered_tags) | ||
1233 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, qdepth); | ||
1234 | else | ||
1235 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, qdepth); | ||
1236 | |||
1237 | DEBUG2(qla_printk(KERN_INFO, ha, | ||
1238 | "scsi(%ld:%d:%d:%d): Queue depth adjusted-up to %d.\n", | ||
1239 | fcport->vha->host_no, sdev->channel, sdev->id, sdev->lun, | ||
1240 | sdev->queue_depth)); | ||
1241 | } | ||
1242 | |||
1220 | static int | 1243 | static int |
1221 | qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) | 1244 | qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) |
1222 | { | 1245 | { |
1223 | if (reason != SCSI_QDEPTH_DEFAULT) | 1246 | switch (reason) { |
1224 | return -EOPNOTSUPP; | 1247 | case SCSI_QDEPTH_DEFAULT: |
1248 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth); | ||
1249 | break; | ||
1250 | case SCSI_QDEPTH_QFULL: | ||
1251 | qla2x00_handle_queue_full(sdev, qdepth); | ||
1252 | break; | ||
1253 | case SCSI_QDEPTH_RAMP_UP: | ||
1254 | qla2x00_adjust_sdev_qdepth_up(sdev, qdepth); | ||
1255 | break; | ||
1256 | default: | ||
1257 | return EOPNOTSUPP; | ||
1258 | } | ||
1225 | 1259 | ||
1226 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), qdepth); | ||
1227 | return sdev->queue_depth; | 1260 | return sdev->queue_depth; |
1228 | } | 1261 | } |
1229 | 1262 | ||