aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/block
diff options
context:
space:
mode:
authorStefan Weinhuber <wein@de.ibm.com>2010-03-24 11:49:53 +0100
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-03-24 11:49:53 +0100
commit4a31ba57cae853ce1ac00a22c0f5d80bd36685ed (patch)
treec604002362185f60f02b4ad364e23030e15b8f26 /drivers/s390/block
parent1bff779285f89cd0b62955c20cca70ada4074236 (diff)
downloadkernel_samsung_tuna-4a31ba57cae853ce1ac00a22c0f5d80bd36685ed.zip
kernel_samsung_tuna-4a31ba57cae853ce1ac00a22c0f5d80bd36685ed.tar.gz
kernel_samsung_tuna-4a31ba57cae853ce1ac00a22c0f5d80bd36685ed.tar.bz2
[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>
Diffstat (limited to 'drivers/s390/block')
-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 51224f7..b3736b8 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)
if (cqr->cpmode == 1) {
cplength = 0;
- datasize = sizeof(struct tcw) + sizeof(struct tsb);
+ /* TCW needs to be 64 byte aligned, so leave enough room */
+ datasize = 64 + sizeof(struct tcw) + sizeof(struct tsb);
} else {
cplength = 2;
datasize = 0;
@@ -2316,8 +2317,8 @@ static struct dasd_ccw_req *dasd_3990_erp_add_erp(struct dasd_ccw_req *cqr)
if (cqr->cpmode == 1) {
/* make a shallow copy of the original tcw but set new tsb */
erp->cpmode = 1;
- erp->cpaddr = erp->data;
- tcw = erp->data;
+ erp->cpaddr = PTR_ALIGN(erp->data, 64);
+ tcw = erp->cpaddr;
tsb = (struct tsb *) &tcw[1];
*tcw = *((struct tcw *)cqr->cpaddr);
tcw->tsb = (long)tsb;