s390: device unregistering.
Subsystems (2)
PATCH 4/8 s390: device unregistering.
[patch 4/8] s390: device unregistering.
From: Cornelia Huck <[email protected]>
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 <[email protected]>
diffstat:
drivers/s390/cio/device_fsm.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-)
drivers/s390/cio/device_fsm.c +10 -6
@@ -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); }