aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Weinhuber <wein@de.ibm.com>2010-03-24 06:49:53 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-03-24 06:49:53 -0400
commit4a31ba57cae853ce1ac00a22c0f5d80bd36685ed (patch)
treec604002362185f60f02b4ad364e23030e15b8f26
parent1bff779285f89cd0b62955c20cca70ada4074236 (diff)
[S390] dasd: fix alignment of transport mode recovery TCW
All TCWs need to be aligned on a 64 byte boundary or the I/O will be rejected. For recovery requests we create fresh TCWs, so we need to do the proper alignment here as well. Signed-off-by: Stefan Weinhuber <wein@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--drivers/s390/block/dasd_3990_erp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/block/dasd_3990_erp.c b/drivers/s390/block/dasd_3990_erp.c
index 51224f76b980..b3736b8aad39 100644
--- a/drivers/s390/block/dasd_3990_erp.c
+++ b/drivers/s390/block/dasd_3990_erp.c
@@ -2287,7 +2287,8 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr)
2287 2287
2288 if (cqr->cpmode == 1) { 2288 if (cqr->cpmode == 1) {
2289 cplength = 0; 2289 cplength = 0;
2290 datasize = sizeof(struct tcw) + sizeof(struct tsb); 2290 /* TCW needs to be 64 byte aligned, so leave enough room */
2291 datasize = 64 + sizeof(struct tcw) + sizeof(struct tsb);
2291 } else { 2292 } else {
2292 cplength = 2; 2293 cplength = 2;
2293 datasize = 0; 2294 datasize = 0;
@@ -2316,8 +2317,8 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr)
2316 if (cqr->cpmode == 1) { 2317 if (cqr->cpmode == 1) {
2317 /* make a shallow copy of the original tcw but set new tsb */ 2318 /* make a shallow copy of the original tcw but set new tsb */
2318 erp->cpmode = 1; 2319 erp->cpmode = 1;
2319 erp->cpaddr = erp->data; 2320 erp->cpaddr = PTR_ALIGN(erp->data, 64);
2320 tcw = erp->data; 2321 tcw = erp->cpaddr;
2321 tsb = (struct tsb *) &tcw[1]; 2322 tsb = (struct tsb *) &tcw[1];
2322 *tcw = *((struct tcw *)cqr->cpaddr); 2323 *tcw = *((struct tcw *)cqr->cpaddr);
2323 tcw->tsb = (long)tsb; 2324 tcw->tsb = (long)tsb;