diff options
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_scsi.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c index 80351fff1a07..522854920369 100644 --- a/drivers/scsi/lpfc/lpfc_scsi.c +++ b/drivers/scsi/lpfc/lpfc_scsi.c | |||
@@ -255,26 +255,7 @@ lpfc_update_stats(struct lpfc_hba *phba, struct lpfc_scsi_buf *lpfc_cmd) | |||
255 | static int | 255 | static int |
256 | lpfc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) | 256 | lpfc_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) |
257 | { | 257 | { |
258 | struct lpfc_vport *vport = (struct lpfc_vport *) sdev->host->hostdata; | 258 | scsi_adjust_queue_depth(sdev, qdepth); |
259 | |||
260 | switch (reason) { | ||
261 | case SCSI_QDEPTH_DEFAULT: | ||
262 | /* change request from sysfs, fall through */ | ||
263 | case SCSI_QDEPTH_RAMP_UP: | ||
264 | scsi_adjust_queue_depth(sdev, qdepth); | ||
265 | break; | ||
266 | case SCSI_QDEPTH_QFULL: | ||
267 | if (scsi_track_queue_full(sdev, qdepth) == 0) | ||
268 | return sdev->queue_depth; | ||
269 | |||
270 | lpfc_printf_vlog(vport, KERN_WARNING, LOG_FCP, | ||
271 | "0711 detected queue full - lun queue " | ||
272 | "depth adjusted to %d.\n", sdev->queue_depth); | ||
273 | break; | ||
274 | default: | ||
275 | return -EOPNOTSUPP; | ||
276 | } | ||
277 | |||
278 | return sdev->queue_depth; | 259 | return sdev->queue_depth; |
279 | } | 260 | } |
280 | 261 | ||
@@ -5918,6 +5899,7 @@ struct scsi_host_template lpfc_template = { | |||
5918 | .change_queue_depth = lpfc_change_queue_depth, | 5899 | .change_queue_depth = lpfc_change_queue_depth, |
5919 | .change_queue_type = scsi_change_queue_type, | 5900 | .change_queue_type = scsi_change_queue_type, |
5920 | .use_blk_tags = 1, | 5901 | .use_blk_tags = 1, |
5902 | .track_queue_depth = 1, | ||
5921 | }; | 5903 | }; |
5922 | 5904 | ||
5923 | struct scsi_host_template lpfc_vport_template = { | 5905 | struct scsi_host_template lpfc_vport_template = { |
@@ -5942,4 +5924,5 @@ struct scsi_host_template lpfc_vport_template = { | |||
5942 | .change_queue_depth = lpfc_change_queue_depth, | 5924 | .change_queue_depth = lpfc_change_queue_depth, |
5943 | .change_queue_type = scsi_change_queue_type, | 5925 | .change_queue_type = scsi_change_queue_type, |
5944 | .use_blk_tags = 1, | 5926 | .use_blk_tags = 1, |
5927 | .track_queue_depth = 1, | ||
5945 | }; | 5928 | }; |