lkml.org 
[lkml]   [2005]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 4/8] s390: device unregistering.
[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);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:11    [W:0.159 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site