diff options
author | Vikas Chaudhary <vikas.chaudhary@qlogic.com> | 2011-03-21 06:34:31 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2011-03-23 13:53:02 -0400 |
commit | 8bb4033d2b91e055a32e905e10a7034a4b077b7a (patch) | |
tree | 4c7f2135700972370c886c430c2e9b87c5fee026 /drivers/scsi | |
parent | fc7657c9d98c250c9fd212348e6e156c73885cc4 (diff) |
[SCSI] qla4xxx: Add support for ql4xmaxqdepth command line parameter
This provides the flexibility to modify the qdepth based on different
target devices to make the best use of system resources.
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla4xxx/ql4_os.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c index f80b702730ad..df46e5d8f74e 100644 --- a/drivers/scsi/qla4xxx/ql4_os.c +++ b/drivers/scsi/qla4xxx/ql4_os.c | |||
@@ -51,6 +51,11 @@ MODULE_PARM_DESC(ql4xenablemsix, | |||
51 | " 2 = enable MSI interrupt mechanism."); | 51 | " 2 = enable MSI interrupt mechanism."); |
52 | 52 | ||
53 | #define QL4_DEF_QDEPTH 32 | 53 | #define QL4_DEF_QDEPTH 32 |
54 | static int ql4xmaxqdepth = QL4_DEF_QDEPTH; | ||
55 | module_param(ql4xmaxqdepth, int, S_IRUGO | S_IWUSR); | ||
56 | MODULE_PARM_DESC(ql4xmaxqdepth, | ||
57 | "Maximum queue depth to report for target devices.\n" | ||
58 | " Default: 32."); | ||
54 | 59 | ||
55 | /* | 60 | /* |
56 | * SCSI host template entry points | 61 | * SCSI host template entry points |
@@ -1904,10 +1909,15 @@ static int qla4xxx_slave_alloc(struct scsi_device *sdev) | |||
1904 | { | 1909 | { |
1905 | struct iscsi_cls_session *sess = starget_to_session(sdev->sdev_target); | 1910 | struct iscsi_cls_session *sess = starget_to_session(sdev->sdev_target); |
1906 | struct ddb_entry *ddb = sess->dd_data; | 1911 | struct ddb_entry *ddb = sess->dd_data; |
1912 | int queue_depth = QL4_DEF_QDEPTH; | ||
1907 | 1913 | ||
1908 | sdev->hostdata = ddb; | 1914 | sdev->hostdata = ddb; |
1909 | sdev->tagged_supported = 1; | 1915 | sdev->tagged_supported = 1; |
1910 | scsi_activate_tcq(sdev, QL4_DEF_QDEPTH); | 1916 | |
1917 | if (ql4xmaxqdepth != 0 && ql4xmaxqdepth <= 0xffffU) | ||
1918 | queue_depth = ql4xmaxqdepth; | ||
1919 | |||
1920 | scsi_activate_tcq(sdev, queue_depth); | ||
1911 | return 0; | 1921 | return 0; |
1912 | } | 1922 | } |
1913 | 1923 | ||