aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;