Commit 4925c7e2 authored by Michael Holzheu's avatar Michael Holzheu Committed by Martin Schwidefsky

[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: default avatarMichael Holzheu <holzheu@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 9c9c1761
...@@ -647,7 +647,10 @@ tape_std_mtcompression(struct tape_device *device, int mt_count) ...@@ -647,7 +647,10 @@ tape_std_mtcompression(struct tape_device *device, int mt_count)
return PTR_ERR(request); return PTR_ERR(request);
request->op = TO_NOP; request->op = TO_NOP;
/* setup ccws */ /* 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_cc(request->cpaddr, MODE_SET_DB, 1, device->modeset_byte);
tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL); tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL);
/* execute it */ /* execute it */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment