Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=742d25b819f11dce91b89e6c9ac17402a119f20a
Commit:     742d25b819f11dce91b89e6c9ac17402a119f20a
Parent:     d5587d5dcd275338af21627a3e931a77a6c04b8d
Author:     Brian King <[EMAIL PROTECTED]>
AuthorDate: Tue May 29 15:46:14 2007 -0500
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Tue May 29 22:52:31 2007 -0500

    [SCSI] ibmvscsi: Changeable queue depth
    
    Adds support for a changeable queue depth to ibmvscsi.
    
    Signed-off-by: Brian King <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 drivers/scsi/ibmvscsi/ibmvscsi.c |   18 ++++++++++++++++++
 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 b10eefe..b580af9 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)
        return 0;
 }
 
+/**
+ * ibmvscsi_change_queue_depth - Change the device's queue depth
+ * @sdev:      scsi device struct
+ * @qdepth:    depth to set
+ *
+ * Return value:
+ *     actual depth set
+ **/
+static int ibmvscsi_change_queue_depth(struct scsi_device *sdev, int qdepth)
+{
+       if (qdepth > IBMVSCSI_MAX_CMDS_PER_LUN)
+               qdepth = IBMVSCSI_MAX_CMDS_PER_LUN;
+
+       scsi_adjust_queue_depth(sdev, 0, qdepth);
+       return sdev->queue_depth;
+}
+
 /* ------------------------------------------------------------
  * sysfs attributes
  */
@@ -1521,6 +1538,7 @@ static struct scsi_host_template driver_template = {
        .eh_abort_handler = ibmvscsi_eh_abort_handler,
        .eh_device_reset_handler = ibmvscsi_eh_device_reset_handler,
        .slave_configure = ibmvscsi_slave_configure,
+       .change_queue_depth = ibmvscsi_change_queue_depth,
        .cmd_per_lun = 16,
        .can_queue = IBMVSCSI_MAX_REQUESTS_DEFAULT,
        .this_id = -1,
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.h b/drivers/scsi/ibmvscsi/ibmvscsi.h
index 77cc1d4..727ca7c 100644
--- a/drivers/scsi/ibmvscsi/ibmvscsi.h
+++ b/drivers/scsi/ibmvscsi/ibmvscsi.h
@@ -45,6 +45,7 @@ struct Scsi_Host;
 #define MAX_INDIRECT_BUFS 10
 
 #define IBMVSCSI_MAX_REQUESTS_DEFAULT 100
+#define IBMVSCSI_MAX_CMDS_PER_LUN 64
 
 /* ------------------------------------------------------------
  * Data Structures
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to