From: Sebastian Ott Date: Fri, 11 Sep 2009 08:28:17 +0000 (+0200) Subject: [S390] cio: fix not oper handling after failed [on|off]line processing X-Git-Tag: v2.6.32-rc1~734^2~50 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=626e476ae011cafddc0ccb39ab838b90cc5d2272;p=profile%2Fivi%2Fkernel-x86-ivi.git [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 Signed-off-by: Martin Schwidefsky --- diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c index b8bdb0d7542..9c1452a6b9a 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;