aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Oberparleiter <peter.oberparleiter@de.ibm.com>2008-09-09 06:38:59 -0400
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2008-09-09 06:39:07 -0400
commitb301ea8c81b13123761772f344faf606c76ba174 (patch)
tree1fe42d0b308dc613b8b518fed09849a9242e027c
parentc91ebe496120e05301465fff31094bfecf798e9f (diff)
[S390] cio: allow offline processing for disconnected devices
When disconnected ccw devices are removed, the device has to be set offline, otherwise there will be side effects including a reference count imbalance. This patch modifies ccw_device_offline to work for devices in disconnecte/not operational state. ccw_device_offline is called by cio for devices which are online during device removal. Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r--drivers/s390/cio/device_fsm.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/s390/cio/device_fsm.c b/drivers/s390/cio/device_fsm.c
index 550508df952b..84cc9ea346db 100644
--- a/drivers/s390/cio/device_fsm.c
+++ b/drivers/s390/cio/device_fsm.c
@@ -658,6 +658,13 @@ ccw_device_offline(struct ccw_device *cdev)
658{ 658{
659 struct subchannel *sch; 659 struct subchannel *sch;
660 660
661 /* Allow ccw_device_offline while disconnected. */
662 if (cdev->private->state == DEV_STATE_DISCONNECTED ||
663 cdev->private->state == DEV_STATE_NOT_OPER) {
664 cdev->private->flags.donotify = 0;
665 ccw_device_done(cdev, DEV_STATE_NOT_OPER);
666 return 0;
667 }
661 if (ccw_device_is_orphan(cdev)) { 668 if (ccw_device_is_orphan(cdev)) {
662 ccw_device_done(cdev, DEV_STATE_OFFLINE); 669 ccw_device_done(cdev, DEV_STATE_OFFLINE);
663 return 0; 670 return 0;