]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Christof Schmitt <christof.schmitt@de.ibm.com> |
2 | Subject: [SCSI] zfcp: Make queue_depth adjustable | |
3 | Patch-mainline: 2.6.31-rc1 | |
4 | Git-commit: a40a1bafe7da0afe61b1c20fc50e18c07ce724f9 | |
5 | References: bnc#513954 | |
6 | ||
7 | [SCSI] zfcp: Make queue_depth adjustable | |
8 | ||
9 | zfcp did always set the queue_depth for SCSI devices to 32, not | |
10 | allowing to change this. Introduce a kernel parameter zfcp.queue_depth | |
11 | and the change_queue_depth callback to allow changing the queue_depth | |
12 | when it is required. | |
13 | ||
14 | Reviewed-by: Swen Schillig <swen@vnet.ibm.com> | |
15 | Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> | |
16 | Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> | |
17 | Acked-by: Jeff Mahoney <jeffm@suse.com> | |
18 | --- | |
19 | drivers/s390/scsi/zfcp_scsi.c | 13 ++++++++++++- | |
20 | 1 file changed, 12 insertions(+), 1 deletion(-) | |
21 | ||
22 | --- a/drivers/s390/scsi/zfcp_scsi.c | |
23 | +++ b/drivers/s390/scsi/zfcp_scsi.c | |
24 | @@ -11,6 +11,10 @@ | |
25 | #include "zfcp_ext.h" | |
26 | #include <asm/atomic.h> | |
27 | ||
28 | +static unsigned int default_depth = 32; | |
29 | +module_param_named(queue_depth, default_depth, uint, 0600); | |
30 | +MODULE_PARM_DESC(queue_depth, "Default queue depth for new SCSI devices"); | |
31 | + | |
32 | /* Find start of Sense Information in FCP response unit*/ | |
33 | char *zfcp_get_fcp_sns_info_ptr(struct fcp_rsp_iu *fcp_rsp_iu) | |
34 | { | |
35 | @@ -23,6 +27,12 @@ char *zfcp_get_fcp_sns_info_ptr(struct f | |
36 | return fcp_sns_info_ptr; | |
37 | } | |
38 | ||
39 | +static int zfcp_scsi_change_queue_depth(struct scsi_device *sdev, int depth) | |
40 | +{ | |
41 | + scsi_adjust_queue_depth(sdev, scsi_get_tag_type(sdev), depth); | |
42 | + return sdev->queue_depth; | |
43 | +} | |
44 | + | |
45 | static void zfcp_scsi_slave_destroy(struct scsi_device *sdpnt) | |
46 | { | |
47 | struct zfcp_unit *unit = (struct zfcp_unit *) sdpnt->hostdata; | |
48 | @@ -34,7 +44,7 @@ static void zfcp_scsi_slave_destroy(stru | |
49 | static int zfcp_scsi_slave_configure(struct scsi_device *sdp) | |
50 | { | |
51 | if (sdp->tagged_supported) | |
52 | - scsi_adjust_queue_depth(sdp, MSG_SIMPLE_TAG, 32); | |
53 | + scsi_adjust_queue_depth(sdp, MSG_SIMPLE_TAG, default_depth); | |
54 | else | |
55 | scsi_adjust_queue_depth(sdp, 0, 1); | |
56 | return 0; | |
57 | @@ -653,6 +663,7 @@ struct zfcp_data zfcp_data = { | |
58 | .name = "zfcp", | |
59 | .module = THIS_MODULE, | |
60 | .proc_name = "zfcp", | |
61 | + .change_queue_depth = zfcp_scsi_change_queue_depth, | |
62 | .slave_alloc = zfcp_scsi_slave_alloc, | |
63 | .slave_configure = zfcp_scsi_slave_configure, | |
64 | .slave_destroy = zfcp_scsi_slave_destroy, |