[patch 4/8] s390: device unregistering.

From: Martin Schwidefsky
Date: Thu Mar 17 2005 - 10:06:00 EST


[patch 4/8] s390: device unregistering.

From: Cornelia Huck <cohuck@xxxxxxxxxx>

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@xxxxxxxxxx>

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/