Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4925c7e22293dbf2b85351e8c2323ad8282396b3
Commit:     4925c7e22293dbf2b85351e8c2323ad8282396b3
Parent:     9c9c17613a78545a4a93b1370924f62eb282c903
Author:     Michael Holzheu <[EMAIL PROTECTED]>
AuthorDate: Mon Mar 5 23:35:47 2007 +0100
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Mon Mar 5 23:35:47 2007 +0100

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 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 7a76ec4..2a1af4e 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)
                return PTR_ERR(request);
        request->op = TO_NOP;
        /* setup ccws */
-       *device->modeset_byte = (mt_count == 0) ? 0x00 : 0x08;
+       if (mt_count == 0)
+               *device->modeset_byte &= ~0x08;
+       else
+               *device->modeset_byte |= 0x08;
        tape_ccw_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
        tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL);
        /* execute it */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to