diff options
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_os.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_os.c | 48 |
1 files changed, 2 insertions, 46 deletions
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 33166ebec7d8..20049b176b64 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -270,6 +270,7 @@ struct scsi_host_template qla2xxx_driver_template = { | |||
270 | 270 | ||
271 | .supported_mode = MODE_INITIATOR, | 271 | .supported_mode = MODE_INITIATOR, |
272 | .use_blk_tags = 1, | 272 | .use_blk_tags = 1, |
273 | .track_queue_depth = 1, | ||
273 | }; | 274 | }; |
274 | 275 | ||
275 | static struct scsi_transport_template *qla2xxx_transport_template = NULL; | 276 | static struct scsi_transport_template *qla2xxx_transport_template = NULL; |
@@ -1415,55 +1416,10 @@ qla2xxx_slave_destroy(struct scsi_device *sdev) | |||
1415 | sdev->hostdata = NULL; | 1416 | sdev->hostdata = NULL; |
1416 | } | 1417 | } |
1417 | 1418 | ||
1418 | static void qla2x00_handle_queue_full(struct scsi_device *sdev, int qdepth) | ||
1419 | { | ||
1420 | fc_port_t *fcport = (struct fc_port *) sdev->hostdata; | ||
1421 | |||
1422 | if (!scsi_track_queue_full(sdev, qdepth)) | ||
1423 | return; | ||
1424 | |||
1425 | ql_dbg(ql_dbg_io, fcport->vha, 0x3029, | ||
1426 | "Queue depth adjusted-down to %d for nexus=%ld:%d:%llu.\n", | ||
1427 | sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun); | ||
1428 | } | ||
1429 | |||
1430 | static void qla2x00_adjust_sdev_qdepth_up(struct scsi_device *sdev, int qdepth) | ||
1431 | { | ||
1432 | fc_port_t *fcport = sdev->hostdata; | ||
1433 | struct scsi_qla_host *vha = fcport->vha; | ||
1434 | struct req_que *req = NULL; | ||
1435 | |||
1436 | req = vha->req; | ||
1437 | if (!req) | ||
1438 | return; | ||
1439 | |||
1440 | if (req->max_q_depth <= sdev->queue_depth || req->max_q_depth < qdepth) | ||
1441 | return; | ||
1442 | |||
1443 | scsi_adjust_queue_depth(sdev, qdepth); | ||
1444 | |||
1445 | ql_dbg(ql_dbg_io, vha, 0x302a, | ||
1446 | "Queue depth adjusted-up to %d for nexus=%ld:%d:%llu.\n", | ||
1447 | sdev->queue_depth, fcport->vha->host_no, sdev->id, sdev->lun); | ||
1448 | } | ||
1449 | |||
1450 | static int | 1419 | static int |
1451 | qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) | 1420 | qla2x00_change_queue_depth(struct scsi_device *sdev, int qdepth, int reason) |
1452 | { | 1421 | { |
1453 | switch (reason) { | 1422 | scsi_adjust_queue_depth(sdev, qdepth); |
1454 | case SCSI_QDEPTH_DEFAULT: | ||
1455 | scsi_adjust_queue_depth(sdev, qdepth); | ||
1456 | break; | ||
1457 | case SCSI_QDEPTH_QFULL: | ||
1458 | qla2x00_handle_queue_full(sdev, qdepth); | ||
1459 | break; | ||
1460 | case SCSI_QDEPTH_RAMP_UP: | ||
1461 | qla2x00_adjust_sdev_qdepth_up(sdev, qdepth); | ||
1462 | break; | ||
1463 | default: | ||
1464 | return -EOPNOTSUPP; | ||
1465 | } | ||
1466 | |||
1467 | return sdev->queue_depth; | 1423 | return sdev->queue_depth; |
1468 | } | 1424 | } |
1469 | 1425 | ||