aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2009-05-15 07:18:16 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-05-23 16:44:14 -0400
commita40a1bafe7da0afe61b1c20fc50e18c07ce724f9 (patch)
tree458e45f4568a55fbf2a00015e6b4474f055beaec /drivers/s390
parent955a21555dc8dc4a81da7063d595cd7558f413ce (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.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index e8fbeaeb5fb..7d0da230eb6 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
15static unsigned int default_depth = 32;
16module_param_named(queue_depth, default_depth, uint, 0600);
17MODULE_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*/
16char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) 20char *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
31static 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
27static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) 37static 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)
34static int zfcp_scsi_slave_configure(struct scsi_device *sdp) 44static 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,