aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block/dasd_eckd.c
diff options
context:
space:
mode:
authorStefan Haberland <stefan.haberland@de.ibm.com>2010-08-09 12:13:00 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-08-09 12:12:54 -0400
commit7c8faa86290c1a2607d6b768a0b874ec392a5c2a (patch)
tree7cb94efdbd3ce3c5eb8fb7a2b7d8a5bedebcb1a2 /drivers/s390/block/dasd_eckd.c
parentf932bcea6b7317312ab38df12a84710fc6c67a81 (diff)
[S390] dasd: tunable missing interrupt handler
This feature provides a user interface to specify the timeout for missing interrupts for standard I/O operations. Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/block/dasd_eckd.c')
-rw-r--r--drivers/s390/block/dasd_eckd.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/s390/block/dasd_eckd.c b/drivers/s390/block/dasd_eckd.c
index 0483b2e76b11..66360c24bd48 100644
--- a/drivers/s390/block/dasd_eckd.c
+++ b/drivers/s390/block/dasd_eckd.c
@@ -1115,8 +1115,9 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
1115 struct dasd_eckd_private *private; 1115 struct dasd_eckd_private *private;
1116 struct dasd_block *block; 1116 struct dasd_block *block;
1117 struct dasd_uid temp_uid; 1117 struct dasd_uid temp_uid;
1118 int is_known, rc; 1118 int is_known, rc, i;
1119 int readonly; 1119 int readonly;
1120 unsigned long value;
1120 1121
1121 if (!ccw_device_is_pathgroup(device->cdev)) { 1122 if (!ccw_device_is_pathgroup(device->cdev)) {
1122 dev_warn(&device->cdev->dev, 1123 dev_warn(&device->cdev->dev,
@@ -1151,6 +1152,18 @@ dasd_eckd_check_characteristics(struct dasd_device *device)
1151 if (rc) 1152 if (rc)
1152 goto out_err1; 1153 goto out_err1;
1153 1154
1155 /* set default timeout */
1156 device->default_expires = DASD_EXPIRES;
1157 if (private->gneq) {
1158 value = 1;
1159 for (i = 0; i < private->gneq->timeout.value; i++)
1160 value = 10 * value;
1161 value = value * private->gneq->timeout.number;
1162 /* do not accept useless values */
1163 if (value != 0 && value <= DASD_EXPIRES_MAX)
1164 device->default_expires = value;
1165 }
1166
1154 /* Generate device unique id */ 1167 /* Generate device unique id */
1155 rc = dasd_eckd_generate_uid(device); 1168 rc = dasd_eckd_generate_uid(device);
1156 if (rc) 1169 if (rc)
@@ -1981,7 +1994,7 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_single(
1981 cqr->startdev = startdev; 1994 cqr->startdev = startdev;
1982 cqr->memdev = startdev; 1995 cqr->memdev = startdev;
1983 cqr->block = block; 1996 cqr->block = block;
1984 cqr->expires = 5 * 60 * HZ; /* 5 minutes */ 1997 cqr->expires = startdev->default_expires * HZ; /* default 5 minutes */
1985 cqr->lpm = private->path_data.ppm; 1998 cqr->lpm = private->path_data.ppm;
1986 cqr->retries = 256; 1999 cqr->retries = 256;
1987 cqr->buildclk = get_clock(); 2000 cqr->buildclk = get_clock();
@@ -2158,7 +2171,7 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_cmd_track(
2158 cqr->startdev = startdev; 2171 cqr->startdev = startdev;
2159 cqr->memdev = startdev; 2172 cqr->memdev = startdev;
2160 cqr->block = block; 2173 cqr->block = block;
2161 cqr->expires = 5 * 60 * HZ; /* 5 minutes */ 2174 cqr->expires = startdev->default_expires * HZ; /* default 5 minutes */
2162 cqr->lpm = private->path_data.ppm; 2175 cqr->lpm = private->path_data.ppm;
2163 cqr->retries = 256; 2176 cqr->retries = 256;
2164 cqr->buildclk = get_clock(); 2177 cqr->buildclk = get_clock();
@@ -2406,7 +2419,7 @@ static struct dasd_ccw_req *dasd_eckd_build_cp_tpm_track(
2406 cqr->startdev = startdev; 2419 cqr->startdev = startdev;
2407 cqr->memdev = startdev; 2420 cqr->memdev = startdev;
2408 cqr->block = block; 2421 cqr->block = block;
2409 cqr->expires = 5 * 60 * HZ; /* 5 minutes */ 2422 cqr->expires = startdev->default_expires * HZ; /* default 5 minutes */
2410 cqr->lpm = private->path_data.ppm; 2423 cqr->lpm = private->path_data.ppm;
2411 cqr->retries = 256; 2424 cqr->retries = 256;
2412 cqr->buildclk = get_clock(); 2425 cqr->buildclk = get_clock();