[S390] cio: deregister ccw device when pgid disband failed
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Thu, 31 May 2007 15:38:07 +0000 (17:38 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Thu, 31 May 2007 15:38:14 +0000 (17:38 +0200)
Deregister ccw device when device failure is detected during offline-
processing (e.g. when no last-path-gone indication was presented by
the hardware) to prevent the device from entering a non-recoverable
not-operational state.

Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device_fsm.c

index 898ec3b2bebb5092c123030504c69aae89b89886..6bba809295772702bf3637bd6b263cb2a415a22b 100644 (file)
@@ -688,6 +688,12 @@ ccw_device_disband_done(struct ccw_device *cdev, int err)
                ccw_device_done(cdev, DEV_STATE_BOXED);
                break;
        default:
+               cdev->private->flags.donotify = 0;
+               if (get_device(&cdev->dev)) {
+                       PREPARE_WORK(&cdev->private->kick_work,
+                                    ccw_device_call_sch_unregister);
+                       queue_work(ccw_device_work, &cdev->private->kick_work);
+               }
                ccw_device_done(cdev, DEV_STATE_NOT_OPER);
                break;
        }