diff options
author | Stefan Haberland <stefan.haberland@de.ibm.com> | 2009-10-14 06:43:48 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-10-14 06:43:53 -0400 |
commit | d9fa9441ed6e0467d7d41de730581874c997e658 (patch) | |
tree | 4f6b0ec9058c616aa8d8265d59dd310d0a0f56a2 | |
parent | be6e3f9cd639fec5882fca16e058843c3064c6c9 (diff) |
[S390] dasd: use idal for device characteristics
If the rdc_buffer is above 2G we need indirect addresssing so we have
to use an idaw to give the rdc_buffer to the ccw.
If the rdc_buffer is under 2G nothing changes.
Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/block/dasd.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c index 53b8c255360a..aaccc8ecfa8f 100644 --- a/drivers/s390/block/dasd.c +++ b/drivers/s390/block/dasd.c | |||
@@ -2533,6 +2533,7 @@ static struct dasd_ccw_req *dasd_generic_build_rdc(struct dasd_device *device, | |||
2533 | { | 2533 | { |
2534 | struct dasd_ccw_req *cqr; | 2534 | struct dasd_ccw_req *cqr; |
2535 | struct ccw1 *ccw; | 2535 | struct ccw1 *ccw; |
2536 | unsigned long *idaw; | ||
2536 | 2537 | ||
2537 | cqr = dasd_smalloc_request(magic, 1 /* RDC */, rdc_buffer_size, device); | 2538 | cqr = dasd_smalloc_request(magic, 1 /* RDC */, rdc_buffer_size, device); |
2538 | 2539 | ||
@@ -2546,9 +2547,17 @@ static struct dasd_ccw_req *dasd_generic_build_rdc(struct dasd_device *device, | |||
2546 | 2547 | ||
2547 | ccw = cqr->cpaddr; | 2548 | ccw = cqr->cpaddr; |
2548 | ccw->cmd_code = CCW_CMD_RDC; | 2549 | ccw->cmd_code = CCW_CMD_RDC; |
2549 | ccw->cda = (__u32)(addr_t)rdc_buffer; | 2550 | if (idal_is_needed(rdc_buffer, rdc_buffer_size)) { |
2550 | ccw->count = rdc_buffer_size; | 2551 | idaw = (unsigned long *) (cqr->data); |
2552 | ccw->cda = (__u32)(addr_t) idaw; | ||
2553 | ccw->flags = CCW_FLAG_IDA; | ||
2554 | idaw = idal_create_words(idaw, rdc_buffer, rdc_buffer_size); | ||
2555 | } else { | ||
2556 | ccw->cda = (__u32)(addr_t) rdc_buffer; | ||
2557 | ccw->flags = 0; | ||
2558 | } | ||
2551 | 2559 | ||
2560 | ccw->count = rdc_buffer_size; | ||
2552 | cqr->startdev = device; | 2561 | cqr->startdev = device; |
2553 | cqr->memdev = device; | 2562 | cqr->memdev = device; |
2554 | cqr->expires = 10*HZ; | 2563 | cqr->expires = 10*HZ; |