mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-13 17:28:56 +00:00
[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>
This commit is contained in:
parent
be6e3f9cd6
commit
d9fa9441ed
@ -2533,6 +2533,7 @@ static struct dasd_ccw_req *dasd_generic_build_rdc(struct dasd_device *device,
|
|||||||
{
|
{
|
||||||
struct dasd_ccw_req *cqr;
|
struct dasd_ccw_req *cqr;
|
||||||
struct ccw1 *ccw;
|
struct ccw1 *ccw;
|
||||||
|
unsigned long *idaw;
|
||||||
|
|
||||||
cqr = dasd_smalloc_request(magic, 1 /* RDC */, rdc_buffer_size, device);
|
cqr = dasd_smalloc_request(magic, 1 /* RDC */, rdc_buffer_size, device);
|
||||||
|
|
||||||
@ -2546,9 +2547,17 @@ static struct dasd_ccw_req *dasd_generic_build_rdc(struct dasd_device *device,
|
|||||||
|
|
||||||
ccw = cqr->cpaddr;
|
ccw = cqr->cpaddr;
|
||||||
ccw->cmd_code = CCW_CMD_RDC;
|
ccw->cmd_code = CCW_CMD_RDC;
|
||||||
|
if (idal_is_needed(rdc_buffer, rdc_buffer_size)) {
|
||||||
|
idaw = (unsigned long *) (cqr->data);
|
||||||
|
ccw->cda = (__u32)(addr_t) idaw;
|
||||||
|
ccw->flags = CCW_FLAG_IDA;
|
||||||
|
idaw = idal_create_words(idaw, rdc_buffer, rdc_buffer_size);
|
||||||
|
} else {
|
||||||
ccw->cda = (__u32)(addr_t) rdc_buffer;
|
ccw->cda = (__u32)(addr_t) rdc_buffer;
|
||||||
ccw->count = rdc_buffer_size;
|
ccw->flags = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
ccw->count = rdc_buffer_size;
|
||||||
cqr->startdev = device;
|
cqr->startdev = device;
|
||||||
cqr->memdev = device;
|
cqr->memdev = device;
|
||||||
cqr->expires = 10*HZ;
|
cqr->expires = 10*HZ;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user