Skip to contentSkip to conversation

s390 (2/9): common i/o layer.

PATCH New Martin Schwidefsky 1 participant 1 message Apr 21, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390 (2/9): common i/o layer.

[PATCH] s390: common i/o layer.

From: Martin Schwidefsky <[email protected]>

Common i/o layer changes:
- Quiesce active subchannels for lpar reipl.
- Delete timer after reception of interrupt for kill on timeout.
- Cleanup some comments in qdio.

diffstat:

 arch/s390/kernel/setup.c      |    4 +-
 arch/s390/kernel/smp.c        |    4 +-
 drivers/s390/cio/cio.c        |   67 +++++++++++++++++++++++++++++++++++++++++-
 drivers/s390/cio/device_fsm.c |    3 +
 drivers/s390/cio/qdio.c       |   12 +++----
 5 files changed, 79 insertions(+), 11 deletions(-)
arch/s390/kernel/setup.c +2 -2
diff -urN linux-2.6/arch/s390/kernel/setup.c linux-2.6-s390/arch/s390/kernel/setup.c
@@ -254,13 +254,13 @@
 /*
  * Reboot, halt and power_off routines for non SMP.
  */
-extern void do_reipl(unsigned long devno);
+extern void reipl(unsigned long devno);
 static void do_machine_restart_nonsmp(char * __unused)
 {
 	if (MACHINE_IS_VM)
 		cpcmd ("IPL", NULL, 0);
 	else
-		do_reipl (0x10000 | S390_lowcore.ipl_device);
+		reipl (0x10000 | S390_lowcore.ipl_device);
 }
 
 static void do_machine_halt_nonsmp(void)
arch/s390/kernel/smp.c +2 -2
diff -urN linux-2.6/arch/s390/kernel/smp.c linux-2.6-s390/arch/s390/kernel/smp.c
@@ -64,7 +64,7 @@
 extern char vmhalt_cmd[];
 extern char vmpoff_cmd[];
 
-extern void do_reipl(unsigned long devno);
+extern void reipl(unsigned long devno);
 
 static void smp_ext_bitcall(int, ec_bit_sig);
 static void smp_ext_bitcall_others(ec_bit_sig);
@@ -278,7 +278,7 @@
 		if (MACHINE_IS_VM)
 			cpcmd ("IPL", NULL, 0);
 		else
-			do_reipl (0x10000 | S390_lowcore.ipl_device);
+			reipl (0x10000 | S390_lowcore.ipl_device);
 	}
 	signal_processor(smp_processor_id(), sigp_stop);
 }
drivers/s390/cio/cio.c +66 -1

76 lines not on this page · raw message

drivers/s390/cio/device_fsm.c +3 -0
diff -urN linux-2.6/drivers/s390/cio/device_fsm.c linux-2.6-s390/drivers/s390/cio/device_fsm.c
@@ -440,12 +440,14 @@
 	if (!ret) {
 		if (get_device(&sch->dev)) {
 			/* Driver doesn't want to keep device. */
+			cio_disable_subchannel(sch);
 			device_unregister(&sch->dev);
 			sch->schib.pmcw.intparm = 0;
 			cio_modify(sch);
 			put_device(&sch->dev);
 		}
 	} else {
+		cio_disable_subchannel(sch);
 		ccw_device_set_timeout(cdev, 0);
 		cdev->private->state = DEV_STATE_DISCONNECTED;
 		wake_up(&cdev->private->wait_q);
@@ -787,6 +789,7 @@
 	struct subchannel *sch;
 
 	sch = to_subchannel(cdev->dev.parent);
+	ccw_device_set_timeout(cdev, 0);
 	/* OK, i/o is dead now. Call interrupt handler. */
 	cdev->private->state = DEV_STATE_ONLINE;
 	if (cdev->handler)
drivers/s390/cio/qdio.c +6 -6
diff -urN linux-2.6/drivers/s390/cio/qdio.c linux-2.6-s390/drivers/s390/cio/qdio.c
@@ -56,7 +56,7 @@
 #include "ioasm.h"
 #include "chsc.h"
 
-#define VERSION_QDIO_C "$Revision: 1.79 $"
+#define VERSION_QDIO_C "$Revision: 1.80 $"
 
 /****************** MODULE PARAMETER VARIABLES ********************/
 MODULE_AUTHOR("Utz Bacher <[email protected]>");
@@ -461,12 +461,12 @@
 
 	switch(slsb[f_mod_no]) {
 
-        /* the hydra has not fetched the output yet */
+        /* the adapter has not fetched the output yet */
 	case SLSB_CU_OUTPUT_PRIMED:
 		QDIO_DBF_TEXT5(0,trace,"outpprim");
 		break;
 
-	/* the hydra got it */
+	/* the adapter got it */
 	case SLSB_P_OUTPUT_EMPTY:
 		atomic_dec(&q->number_of_buffers_used);
 		f++;
@@ -919,7 +919,7 @@
 	no_used=atomic_read(&q->number_of_buffers_used);
 
 	/* 
-	 * we need that one for synchronization with Hydra, as Hydra
+	 * we need that one for synchronization with the adapter, as it
 	 * does a kind of PCI avoidance 
 	 */
 	SYNC_MEMORY;
@@ -1069,7 +1069,7 @@
 	}
 	/*
 	 * maybe we have to do work on our outbound queues... at least
-	 * we have to check Hydra outbound-int-capable thinint-capable
+	 * we have to check the outbound-int-capable thinint-capable
 	 * queues
 	 */
 	if (q->hydra_gives_outbound_pcis) {
@@ -2027,7 +2027,7 @@
 		goto exit;
 	}
 
-	/* Check for hydra thin interrupts (bit 67). */
+	/* Check for OSA/FCP thin interrupts (bit 67). */
 	hydra_thinints = ((scsc_area->general_char[2] & 0x10000000)
 		== 0x10000000);
 	sprintf(dbf_text,"hydrati%1x", hydra_thinints);