diff options
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/tape_34xx.c | 19 | ||||
-rw-r--r-- | drivers/s390/char/tape_3590.c | 23 |
2 files changed, 20 insertions, 22 deletions
diff --git a/drivers/s390/char/tape_34xx.c b/drivers/s390/char/tape_34xx.c index ea3e6a345c89..5b47e9cce75f 100644 --- a/drivers/s390/char/tape_34xx.c +++ b/drivers/s390/char/tape_34xx.c | |||
@@ -1173,16 +1173,15 @@ tape_34xx_bread(struct tape_device *device, struct request *req) | |||
1173 | ccw = tape_ccw_cc(ccw, NOP, 0, NULL); | 1173 | ccw = tape_ccw_cc(ccw, NOP, 0, NULL); |
1174 | 1174 | ||
1175 | rq_for_each_segment(bv, req, iter) { | 1175 | rq_for_each_segment(bv, req, iter) { |
1176 | dst = kmap(bv->bv_page) + bv->bv_offset; | 1176 | dst = kmap(bv->bv_page) + bv->bv_offset; |
1177 | for (off = 0; off < bv->bv_len; | 1177 | for (off = 0; off < bv->bv_len; off += TAPEBLOCK_HSEC_SIZE) { |
1178 | off += TAPEBLOCK_HSEC_SIZE) { | 1178 | ccw->flags = CCW_FLAG_CC; |
1179 | ccw->flags = CCW_FLAG_CC; | 1179 | ccw->cmd_code = READ_FORWARD; |
1180 | ccw->cmd_code = READ_FORWARD; | 1180 | ccw->count = TAPEBLOCK_HSEC_SIZE; |
1181 | ccw->count = TAPEBLOCK_HSEC_SIZE; | 1181 | set_normalized_cda(ccw, (void*) __pa(dst)); |
1182 | set_normalized_cda(ccw, (void*) __pa(dst)); | 1182 | ccw++; |
1183 | ccw++; | 1183 | dst += TAPEBLOCK_HSEC_SIZE; |
1184 | dst += TAPEBLOCK_HSEC_SIZE; | 1184 | } |
1185 | } | ||
1186 | } | 1185 | } |
1187 | 1186 | ||
1188 | ccw = tape_ccw_end(ccw, NOP, 0, NULL); | 1187 | ccw = tape_ccw_end(ccw, NOP, 0, NULL); |
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index b16ad7a7631d..9f244c591eeb 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -652,18 +652,17 @@ tape_3590_bread(struct tape_device *device, struct request *req) | |||
652 | ccw = tape_ccw_cc(ccw, NOP, 0, NULL); | 652 | ccw = tape_ccw_cc(ccw, NOP, 0, NULL); |
653 | 653 | ||
654 | rq_for_each_segment(bv, req, iter) { | 654 | rq_for_each_segment(bv, req, iter) { |
655 | dst = page_address(bv->bv_page) + bv->bv_offset; | 655 | dst = page_address(bv->bv_page) + bv->bv_offset; |
656 | for (off = 0; off < bv->bv_len; | 656 | for (off = 0; off < bv->bv_len; off += TAPEBLOCK_HSEC_SIZE) { |
657 | off += TAPEBLOCK_HSEC_SIZE) { | 657 | ccw->flags = CCW_FLAG_CC; |
658 | ccw->flags = CCW_FLAG_CC; | 658 | ccw->cmd_code = READ_FORWARD; |
659 | ccw->cmd_code = READ_FORWARD; | 659 | ccw->count = TAPEBLOCK_HSEC_SIZE; |
660 | ccw->count = TAPEBLOCK_HSEC_SIZE; | 660 | set_normalized_cda(ccw, (void *) __pa(dst)); |
661 | set_normalized_cda(ccw, (void *) __pa(dst)); | 661 | ccw++; |
662 | ccw++; | 662 | dst += TAPEBLOCK_HSEC_SIZE; |
663 | dst += TAPEBLOCK_HSEC_SIZE; | 663 | } |
664 | } | 664 | if (off > bv->bv_len) |
665 | if (off > bv->bv_len) | 665 | BUG(); |
666 | BUG(); | ||
667 | } | 666 | } |
668 | ccw = tape_ccw_end(ccw, NOP, 0, NULL); | 667 | ccw = tape_ccw_end(ccw, NOP, 0, NULL); |
669 | DBF_EVENT(6, "xBREDccwg\n"); | 668 | DBF_EVENT(6, "xBREDccwg\n"); |