mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch 4/8] s390: device unregistering.
@ 2005-03-17 14:56 Martin Schwidefsky
  0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2005-03-17 14:56 UTC (permalink / raw)
  To: akpm, linux-kernel

[patch 4/8] s390: device unregistering.

From: Cornelia Huck <cohuck@de.ibm.com>

Common i/o layer changes:
 - Don't unregister devices from ccw_device_{on,off}line_notoper directly,
   but put the unregister on the ccw_device_work workqueue (as it is done
   for all other unregisters).

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

diffstat:
 drivers/s390/cio/device_fsm.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff -urN linux-2.6/drivers/s390/cio/device_fsm.c linux-2.6-patched/drivers/s390/cio/device_fsm.c
--- linux-2.6/drivers/s390/cio/device_fsm.c	2005-03-17 15:35:50.000000000 +0100
+++ linux-2.6-patched/drivers/s390/cio/device_fsm.c	2005-03-17 15:36:00.000000000 +0100
@@ -649,9 +649,11 @@
 
 	cdev->private->state = DEV_STATE_NOT_OPER;
 	sch = to_subchannel(cdev->dev.parent);
-	device_unregister(&sch->dev);
-	sch->schib.pmcw.intparm = 0;
-	cio_modify(sch);
+	if (get_device(&cdev->dev)) {
+		PREPARE_WORK(&cdev->private->kick_work,
+			     ccw_device_call_sch_unregister, (void *)cdev);
+		queue_work(ccw_device_work, &cdev->private->kick_work);
+	}
 	wake_up(&cdev->private->wait_q);
 }
 
@@ -678,9 +680,11 @@
 		// FIXME: not-oper indication to device driver ?
 		ccw_device_call_handler(cdev);
 	}
-	device_unregister(&sch->dev);
-	sch->schib.pmcw.intparm = 0;
-	cio_modify(sch);
+	if (get_device(&cdev->dev)) {
+		PREPARE_WORK(&cdev->private->kick_work,
+			     ccw_device_call_sch_unregister, (void *)cdev);
+		queue_work(ccw_device_work, &cdev->private->kick_work);
+	}
 	wake_up(&cdev->private->wait_q);
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-03-17 14:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-17 14:56 [patch 4/8] s390: device unregistering Martin Schwidefsky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®