aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/ibmvscsi.c
diff options
context:
space:
mode:
authorBrian King <brking@linux.vnet.ibm.com>2007-05-29 16:46:14 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-29 23:52:31 -0400
commit742d25b819f11dce91b89e6c9ac17402a119f20a (patch)
tree542323687fa594b0fecf2136585998668124a957 /drivers/scsi/ibmvscsi/ibmvscsi.c
parentd5587d5dcd275338af21627a3e931a77a6c04b8d (diff)
[SCSI] ibmvscsi: Changeable queue depth
Adds support for a changeable queue depth to ibmvscsi. Signed-off-by: Brian King <brking@linux.vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvscsi.c')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvscsi.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c
index b10eefe735c5..b580af95956b 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.c
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.c
@@ -1375,6 +1375,23 @@ static int ibmvscsi_slave_configure(struct scsi_device *sdev)
1375 return 0; 1375 return 0;
1376} 1376}
1377 1377
1378/**
1379 * ibmvscsi_change_queue_depth - Change the device's queue depth
1380 * @sdev: scsi device struct
1381 * @qdepth: depth to set
1382 *
1383 * Return value:
1384 * actual depth set
1385 **/
1386static int ibmvscsi_change_queue_depth(struct scsi_device *sdev, int qdepth)
1387{
1388 if (qdepth > IBMVSCSI_MAX_CMDS_PER_LUN)
1389 qdepth = IBMVSCSI_MAX_CMDS_PER_LUN;
1390
1391 scsi_adjust_queue_depth(sdev, 0, qdepth);
1392 return sdev->queue_depth;
1393}
1394
1378/* ------------------------------------------------------------ 1395/* ------------------------------------------------------------
1379 * sysfs attributes 1396 * sysfs attributes
1380 */ 1397 */
@@ -1521,6 +1538,7 @@ static struct scsi_host_template driver_template = {
1521 .eh_abort_handler = ibmvscsi_eh_abort_handler, 1538 .eh_abort_handler = ibmvscsi_eh_abort_handler,
1522 .eh_device_reset_handler = ibmvscsi_eh_device_reset_handler, 1539 .eh_device_reset_handler = ibmvscsi_eh_device_reset_handler,
1523 .slave_configure = ibmvscsi_slave_configure, 1540 .slave_configure = ibmvscsi_slave_configure,
1541 .change_queue_depth = ibmvscsi_change_queue_depth,
1524 .cmd_per_lun = 16, 1542 .cmd_per_lun = 16,
1525 .can_queue = IBMVSCSI_MAX_REQUESTS_DEFAULT, 1543 .can_queue = IBMVSCSI_MAX_REQUESTS_DEFAULT,
1526 .this_id = -1, 1544 .this_id = -1,