Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/tape: fix MTIOCGET ioctl to report blocksize

Remove tape_state from status register and report the drive's current
setting for block size instead as known from other tapes.
Density is not supported so nothing to report here.

Signed-off-by: Stefan Haberland <stefan.haberland@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Stefan Haberland and committed by
Martin Schwidefsky
9fc98ad0 8f933b10

+3 -1
+3 -1
drivers/s390/char/tape_char.c
··· 402 402 memset(&get, 0, sizeof(get)); 403 403 get.mt_type = MT_ISUNKNOWN; 404 404 get.mt_resid = 0 /* device->devstat.rescnt */; 405 - get.mt_dsreg = device->tape_state; 405 + get.mt_dsreg = 406 + ((device->char_data.block_size << MT_ST_BLKSIZE_SHIFT) 407 + & MT_ST_BLKSIZE_MASK); 406 408 /* FIXME: mt_gstat, mt_erreg, mt_fileno */ 407 409 get.mt_gstat = 0; 408 410 get.mt_erreg = 0;