Skip to content

Commit effcf3d

Browse files
hoeppnerjhcahca
authored andcommitted
s390/tape: Remove tape load display support
The LOAD_DISPLAY (LDD) X'9F' is still accepted by the Virtual Tape Server (VTS) but does not perform any action. Remove all functions and definitions related to this command. The tape_34xx_ioctl() function is also removed as it was mainly used to handle additional ioctl functionality. LOAD_DISPLAY was the only left case. All other ioctls are handled in tapechar_ioctl(). With LOAD_DISPLAY, the remaining definitions in asm/tape390.h are gone. Delete the file. Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com> Reviewed-by: Jens Remus <jremus@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
1 parent c03b6ef commit effcf3d

6 files changed

Lines changed: 1 addition & 99 deletions

File tree

arch/s390/include/uapi/asm/tape390.h

Lines changed: 0 additions & 39 deletions
This file was deleted.

drivers/s390/char/tape.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ struct tape_discipline {
151151
struct tape_request *(*read_block)(struct tape_device *);
152152
struct tape_request *(*write_block)(struct tape_device *);
153153
void (*process_eov)(struct tape_device*);
154-
/* ioctl function for additional ioctls. */
155-
int (*ioctl_fn)(struct tape_device *, unsigned int, unsigned long);
156154
/* Array of tape commands with TAPE_NR_MTOPS entries */
157155
tape_mtop_fn *mtop_array;
158156
};

drivers/s390/char/tape_34xx.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -835,23 +835,6 @@ tape_34xx_irq(struct tape_device *device, struct tape_request *request,
835835
return TAPE_IO_STOP;
836836
}
837837

838-
/*
839-
* ioctl_overload
840-
*/
841-
static int
842-
tape_34xx_ioctl(struct tape_device *device, unsigned int cmd, unsigned long arg)
843-
{
844-
if (cmd == TAPE390_DISPLAY) {
845-
struct display_struct disp;
846-
847-
if (copy_from_user(&disp, (char __user *) arg, sizeof(disp)) != 0)
848-
return -EFAULT;
849-
850-
return tape_std_display(device, &disp);
851-
} else
852-
return -EINVAL;
853-
}
854-
855838
static inline void
856839
tape_34xx_append_new_sbid(struct tape_34xx_block_id bid, struct list_head *l)
857840
{
@@ -1134,7 +1117,6 @@ static struct tape_discipline tape_discipline_34xx = {
11341117
.irq = tape_34xx_irq,
11351118
.read_block = tape_std_read_block,
11361119
.write_block = tape_std_write_block,
1137-
.ioctl_fn = tape_34xx_ioctl,
11381120
.mtop_array = tape_34xx_mtop
11391121
};
11401122

drivers/s390/char/tape_char.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -412,10 +412,7 @@ __tapechar_ioctl(struct tape_device *device,
412412

413413
return put_user_mtget(data, &get);
414414
}
415-
/* Try the discipline ioctl function. */
416-
if (device->discipline->ioctl_fn == NULL)
417-
return -EINVAL;
418-
return device->discipline->ioctl_fn(device, no, (unsigned long)data);
415+
return -EINVAL;
419416
}
420417

421418
static long

drivers/s390/char/tape_std.c

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include <asm/types.h>
2323
#include <asm/idals.h>
2424
#include <asm/ebcdic.h>
25-
#include <asm/tape390.h>
2625

2726
#define TAPE_DBF_AREA tape_core_dbf
2827

@@ -118,36 +117,6 @@ tape_std_unassign (struct tape_device *device)
118117
return rc;
119118
}
120119

121-
/*
122-
* TAPE390_DISPLAY: Show a string on the tape display.
123-
*/
124-
int
125-
tape_std_display(struct tape_device *device, struct display_struct *disp)
126-
{
127-
struct tape_request *request;
128-
int rc;
129-
130-
request = tape_alloc_request(2, 17);
131-
if (IS_ERR(request)) {
132-
DBF_EVENT(3, "TAPE: load display failed\n");
133-
return PTR_ERR(request);
134-
}
135-
request->op = TO_DIS;
136-
137-
*(unsigned char *) request->cpdata = disp->cntrl;
138-
DBF_EVENT(5, "TAPE: display cntrl=%04x\n", disp->cntrl);
139-
memcpy(((unsigned char *) request->cpdata) + 1, disp->message1, 8);
140-
memcpy(((unsigned char *) request->cpdata) + 9, disp->message2, 8);
141-
ASCEBC(((unsigned char*) request->cpdata) + 1, 16);
142-
143-
tape_ccw_cc(request->cpaddr, LOAD_DISPLAY, 17, request->cpdata);
144-
tape_ccw_end(request->cpaddr + 1, NOP, 0, NULL);
145-
146-
rc = tape_do_io_interruptible(device, request);
147-
tape_free_request(request);
148-
return rc;
149-
}
150-
151120
/*
152121
* Read block id.
153122
*/
@@ -696,7 +665,6 @@ tape_std_process_eov(struct tape_device *device)
696665

697666
EXPORT_SYMBOL(tape_std_assign);
698667
EXPORT_SYMBOL(tape_std_unassign);
699-
EXPORT_SYMBOL(tape_std_display);
700668
EXPORT_SYMBOL(tape_std_read_block_id);
701669
EXPORT_SYMBOL(tape_std_mtload);
702670
EXPORT_SYMBOL(tape_std_mtsetblk);

drivers/s390/char/tape_std.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#ifndef _TAPE_STD_H
1212
#define _TAPE_STD_H
1313

14-
#include <asm/tape390.h>
15-
1614
/*
1715
* Biggest block size of 256K to handle.
1816
*/
@@ -41,7 +39,6 @@
4139
#define ASSIGN 0xB7 /* 3420 REJECT,3480 OK */
4240
#define CONTROL_ACCESS 0xE3 /* Set high speed */
4341
#define DIAG_MODE_SET 0x0B /* 3420 NOP, 3480 REJECT */
44-
#define LOAD_DISPLAY 0x9F /* 3420 REJECT,3480 OK */
4542
#define LOCATE 0x4F /* 3420 REJ, 3480 NOP */
4643
#define LOOP_WRITE_TO_READ 0x8B /* 3480 REJECT */
4744
#define MODE_SET_DB 0xDB /* 3420 REJECT,3480 OK */
@@ -105,7 +102,6 @@ struct tape_request *tape_std_write_block(struct tape_device *);
105102
int tape_std_assign(struct tape_device *);
106103
int tape_std_unassign(struct tape_device *);
107104
int tape_std_read_block_id(struct tape_device *device, __u64 *id);
108-
int tape_std_display(struct tape_device *, struct display_struct *disp);
109105
int tape_std_terminate_write(struct tape_device *);
110106

111107
/* Standard magnetic tape commands. */

0 commit comments

Comments
 (0)