diff options
author | Christof Schmitt <christof.schmitt@de.ibm.com> | 2009-05-15 07:18:16 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-05-23 16:44:14 -0400 |
commit | a40a1bafe7da0afe61b1c20fc50e18c07ce724f9 (patch) | |
tree | 458e45f4568a55fbf2a00015e6b4474f055beaec /drivers/s390 | |
parent | 955a21555dc8dc4a81da7063d595cd7558f413ce (diff) |
[SCSI] zfcp: Make queue_depth adjustable
zfcp did always set the queue_depth for SCSI devices to 32, not
allowing to change this. Introduce a kernel parameter zfcp.queue_depth
and the change_queue_depth callback to allow changing the queue_depth
when it is required.
Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/scsi/zfcp_scsi.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c index e8fbeaeb5fbf..7d0da230eb63 100644 --- a/drivers/s390/scsi/zfcp_scsi.c +++ b/drivers/s390/scsi/zfcp_scsi.c | |||
@@ -12,6 +12,10 @@ | |||
12 | #include "zfcp_ext.h" | 12 | #include "zfcp_ext.h" |
13 | #include <asm/atomic.h> | 13 | #include <asm/atomic.h> |
14 | 14 | ||
15 | static unsigned int default_depth = 32; | ||
16 | module_param_named(queue_depth, default_depth, uint, 0600); | ||
17 | MODULE_PARM_DESC(queue_depth, "Default queue depth for new SCSI devices"); | ||
18 | |||
15 | /* Find start of Sense Information in FCP response unit*/ | 19 | /* Find start of Sense Information in FCP response unit*/ |
16 | char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) | 20 | char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) |
17 | { | 21 | { |
@@ -24,6 +28,12 @@ char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) | |||
24 | return fcp_sns_info_ptr; | 28 | return fcp_sns_info_ptr; |
25 | } | 29 | } |
26 | 30 | ||
31 | static int zfcp_scsi_change_queue_depth(struct scsi_device *sdev, int depth) | ||
32 | { | ||
33 | scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); | ||
34 | return sdev->queue_depth; | ||
35 | } | ||
36 | |||
27 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) | 37 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) |
28 | { | 38 | { |
29 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; | 39 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; |
@@ -34,7 +44,7 @@ static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) | |||
34 | static int zfcp_scsi_slave_configure(struct scsi_device *sdp) | 44 | static int zfcp_scsi_slave_configure(struct scsi_device *sdp) |
35 | { | 45 | { |
36 | if (sdp->tagged_supported) | 46 | if (sdp->tagged_supported) |
37 | scsi_adjust_queue_depth(sdp, MSG_SIMPLE_TAG, 32); | 47 | scsi_adjust_queue_depth(sdp, MSG_SIMPLE_TAG, default_depth); |
38 | else | 48 | else |
39 | scsi_adjust_queue_depth(sdp, 0, 1); | 49 | scsi_adjust_queue_depth(sdp, 0, 1); |
40 | return 0; | 50 | return 0; |
@@ -647,6 +657,7 @@ struct zfcp_data zfcp_data = { | |||
647 | .name = "zfcp", | 657 | .name = "zfcp", |
648 | .module = THIS_MODULE, | 658 | .module = THIS_MODULE, |
649 | .proc_name = "zfcp", | 659 | .proc_name = "zfcp", |
660 | .change_queue_depth = zfcp_scsi_change_queue_depth, | ||
650 | .slave_alloc = zfcp_scsi_slave_alloc, | 661 | .slave_alloc = zfcp_scsi_slave_alloc, |
651 | .slave_configure = zfcp_scsi_slave_configure, | 662 | .slave_configure = zfcp_scsi_slave_configure, |
652 | .slave_destroy = zfcp_scsi_slave_destroy, | 663 | .slave_destroy = zfcp_scsi_slave_destroy, |