[S390] cio: handle failed disable_subchannel after device recognition
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Mon, 7 Dec 2009 11:51:36 +0000 (12:51 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Mon, 7 Dec 2009 11:51:32 +0000 (12:51 +0100)
Handle a failing cio_disable_subchannel at the end of our device
recognition as if the recognition itself failed. This way
subsequent registration steps do not need to handle enabled
subchannels.

Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device_fsm.c

index 862b89ef3ee6b54be1c376af4f143096749b28c6..ae760658a131f43ecbaa7cd49c1d20082364e742 100644 (file)
@@ -229,7 +229,8 @@ ccw_device_recog_done(struct ccw_device *cdev, int state)
 
        sch = to_subchannel(cdev->dev.parent);
 
-       cio_disable_subchannel(sch);
+       if (cio_disable_subchannel(sch))
+               state = DEV_STATE_NOT_OPER;
        /*
         * Now that we tried recognition, we have performed device selection
         * through ssch() and the path information is up to date.