diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2009-09-11 10:28:17 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-09-11 10:29:37 +0200 |
commit | 626e476ae011cafddc0ccb39ab838b90cc5d2272 (patch) | |
tree | 98e90e6191ac52833721abf89ae675c756239003 /drivers/s390/cio/device_fsm.c | |
parent | [S390] cio: consolidate subchannel intparm reset (diff) | |
download | linux-626e476ae011cafddc0ccb39ab838b90cc5d2272.tar.xz linux-626e476ae011cafddc0ccb39ab838b90cc5d2272.zip |
[S390] cio: fix not oper handling after failed [on|off]line processing
If online/offline processing of a ccw device fails, resulting in not
operational state, notify the driver and unregister the device in case
the driver dosn't want to keep it.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device_fsm.c')
-rw-r--r-- | drivers/s390/cio/device_fsm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index b8bdb0d75426..9c1452a6b9a1 100644 --- a/drivers/s390/cio/device_fsm.c +++ b/drivers/s390/cio/device_fsm.c @@ -394,6 +394,13 @@ ccw_device_done(struct ccw_device *cdev, int state) ccw_device_schedule_sch_unregister(cdev); cdev->private->flags.donotify = 0; } + if (state == DEV_STATE_NOT_OPER) { + CIO_MSG_EVENT(0, "Device %04x gone on subchannel %04x\n", + cdev->private->dev_id.devno, sch->schid.sch_no); + if (!ccw_device_notify(cdev, CIO_GONE)) + ccw_device_schedule_sch_unregister(cdev); + cdev->private->flags.donotify = 0; + } if (cdev->private->flags.donotify) { cdev->private->flags.donotify = 0; |