Skip to contentSkip to conversation

s390 (4/5): tape class for s390 tapes.

PATCH New Martin Schwidefsky 1 participant 1 message Mar 1, 2004 s390

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390 (4/5): tape class for s390 tapes.

s390 tape device driver changes:
- Add private tape class to support udev configuration.

diffstat:

 drivers/s390/char/Makefile     |    2 
 drivers/s390/char/tape.h       |    8 ---
 drivers/s390/char/tape_block.c |    5 --
 drivers/s390/char/tape_char.c  |   65 ++++++++++++++++++++------
 drivers/s390/char/tape_class.c |  100 +++++++++++++++++++++++++++++++++++++++++
 drivers/s390/char/tape_class.h |   54 ++++++++++++++++++++++
 drivers/s390/char/tape_core.c  |   66 +--------------------------
 7 files changed, 209 insertions(+), 91 deletions(-)
drivers/s390/char/Makefile +1 -1
diff -urN linux-2.6/drivers/s390/char/Makefile linux-2.6-s390/drivers/s390/char/Makefile
@@ -18,6 +18,6 @@
 
 tape-$(CONFIG_S390_TAPE_BLOCK) += tape_block.o
 tape-$(CONFIG_PROC_FS) += tape_proc.o
-tape-objs := tape_core.o tape_std.o tape_char.o $(tape-y)
+tape-objs := tape_core.o tape_std.o tape_char.o tape_class.o $(tape-y)
 obj-$(CONFIG_S390_TAPE) += tape.o
 obj-$(CONFIG_S390_TAPE_34XX) += tape_34xx.o
drivers/s390/char/tape.h +2 -6
diff -urN linux-2.6/drivers/s390/char/tape.h linux-2.6-s390/drivers/s390/char/tape.h
@@ -60,12 +60,6 @@
 #define TAPEBLOCK_HSEC_S2B	2
 #define TAPEBLOCK_RETRIES	5
 
-/* Event types for hotplug */
-#define TAPE_HOTPLUG_CHAR_ADD     1
-#define TAPE_HOTPLUG_BLOCK_ADD    2
-#define TAPE_HOTPLUG_CHAR_REMOVE  3
-#define TAPE_HOTPLUG_BLOCK_REMOVE 4
-
 enum tape_medium_state {
 	MS_UNKNOWN,
 	MS_LOADED,
@@ -205,6 +199,8 @@
 	struct list_head		node;
 
 	struct ccw_device *		cdev;
+	struct cdev *			nt;
+	struct cdev *			rt;
 
 	/* Device discipline information. */
 	struct tape_discipline *	discipline;
drivers/s390/char/tape_block.c +0 -5
diff -urN linux-2.6/drivers/s390/char/tape_block.c linux-2.6-s390/drivers/s390/char/tape_block.c
@@ -259,9 +259,6 @@
 	INIT_WORK(&blkdat->requeue_task, tapeblock_requeue,
 		tape_get_device_reference(device));
 
-	/* Will vanish */
-	tape_hotplug_event(device, tapeblock_major, TAPE_HOTPLUG_BLOCK_ADD);
-
 	return 0;
 
 cleanup_queue:
@@ -274,8 +271,6 @@
 void
 tapeblock_cleanup_device(struct tape_device *device)
 {
-	tape_hotplug_event(device, tapeblock_major, TAPE_HOTPLUG_BLOCK_REMOVE);
-
 	flush_scheduled_work();
 	device->blk_data.requeue_task.data = tape_put_device(device);
 
drivers/s390/char/tape_char.c +49 -16

100 lines not on this page · raw message

drivers/s390/char/tape_class.c +100 -0

100 lines not on this page · raw message

drivers/s390/char/tape_class.h +54 -0

54 lines not on this page · raw message

drivers/s390/char/tape_core.c +3 -63

90 lines not on this page · raw message