diff options
author | Michael Holzheu <holzheu@de.ibm.com> | 2007-03-05 17:35:47 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2007-03-05 17:35:47 -0500 |
commit | 4925c7e22293dbf2b85351e8c2323ad8282396b3 (patch) | |
tree | fa89ef269630ce6e5cb928ce7e681f2bd55d327b /drivers | |
parent | 9c9c17613a78545a4a93b1370924f62eb282c903 (diff) |
[S390] tape: Compression overwrites crypto setting
After switching compression on/off with the mt command, tape encryption is no
longer working. The reason for that is, that the modeset_byte is set to
the compression value instead of using bitwise and/or bit operations to
enable/disable the corresponding bit.
Signed-off-by: Michael Holzheu <holzheu@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/char/tape_std.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/s390/char/tape_std.c b/drivers/s390/char/tape_std.c index 7a76ec413a3a..2a1af4e60be0 100644 --- a/drivers/s390/char/tape_std.c +++ b/drivers/s390/char/tape_std.c | |||
@@ -647,7 +647,10 @@ tape_std_mtcompression(struct tape_device *device, int mt_count) | |||
647 | return PTR_ERR(request); | 647 | return PTR_ERR(request); |
648 | request->op = TO_NOP; | 648 | request->op = TO_NOP; |
649 | /* setup ccws */ | 649 | /* setup ccws */ |
650 | *device->modeset_byte = (mt_count == 0) ? 0x00 : 0x08; | 650 | if (mt_count == 0) |
651 | *device->modeset_byte &= ~0x08; | ||
652 | else | ||
653 | *device->modeset_byte |= 0x08; | ||
651 | tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); | 654 | tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte); |
652 | tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL); | 655 | tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL); |
653 | /* execute it */ | 656 | /* execute it */ |