diff options
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.c | 18 | ||||
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.h | 1 |
2 files changed, 19 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 | **/ | ||
1386 | static 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, |
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.h b/drivers/scsi/ibmvscsi/ibmvscsi.h index 77cc1d40f5bb..727ca7c95926 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.h +++ b/drivers/scsi/ibmvscsi/ibmvscsi.h | |||
@@ -45,6 +45,7 @@ struct Scsi_Host; | |||
45 | #define MAX_INDIRECT_BUFS 10 | 45 | #define MAX_INDIRECT_BUFS 10 |
46 | 46 | ||
47 | #define IBMVSCSI_MAX_REQUESTS_DEFAULT 100 | 47 | #define IBMVSCSI_MAX_REQUESTS_DEFAULT 100 |
48 | #define IBMVSCSI_MAX_CMDS_PER_LUN 64 | ||
48 | 49 | ||
49 | /* ------------------------------------------------------------ | 50 | /* ------------------------------------------------------------ |
50 | * Data Structures | 51 | * Data Structures |