From 9fc98ad0d2bf3cd71772d1bda75e7a8b4dce261b Mon Sep 17 00:00:00 2001 From: Stefan Haberland Date: Tue, 16 Sep 2014 11:02:24 +0200 Subject: 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 Signed-off-by: Martin Schwidefsky --- drivers/s390/char/tape_char.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/s390/char/tape_char.c') diff --git a/drivers/s390/char/tape_char.c b/drivers/s390/char/tape_char.c index 6dc60725de92..77f9b9c2f701 100644 --- a/drivers/s390/char/tape_char.c +++ b/drivers/s390/char/tape_char.c @@ -402,7 +402,9 @@ __tapechar_ioctl(struct tape_device *device, memset(&get, 0, sizeof(get)); get.mt_type = MT_ISUNKNOWN; get.mt_resid = 0 /* device->devstat.rescnt */; - get.mt_dsreg = device->tape_state; + get.mt_dsreg = + ((device->char_data.block_size << MT_ST_BLKSIZE_SHIFT) + & MT_ST_BLKSIZE_MASK); /* FIXME: mt_gstat, mt_erreg, mt_fileno */ get.mt_gstat = 0; get.mt_erreg = 0; -- cgit v1.2.3