s390/cio: fix unbind of io_subchannel_driver
authorSebastian Ott <sebott@linux.vnet.ibm.com>
Thu, 15 Mar 2018 14:03:43 +0000 (15:03 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 26 Mar 2018 14:13:06 +0000 (16:13 +0200)
commit135a8b4ce5d737115571f08c6d0649f1aed6a48a
tree2c604872a0bea58568e5435a11797333364d53eb
parent88bf319fc2d6d971ef8692c2cae7f96708340461
s390/cio: fix unbind of io_subchannel_driver

If the io_subchannel_driver is unbound from a subchannel it bluntly kills
all I/O on the subchannel and sets the ccw_device state to not operable
before deregistering the ccw_device. However, for online devices we should
set the device offline (disband path groups etc.) which does not happen if
the device is in not oper state.

Simply deregister the ccw device - ccw_device_remove is smart enough to set
the device offline properly. If everything fails call io_subchannel_quiesce
afterwards as a safeguard.

Reported-by: Shalini Chellathurai Saroja <shalini@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Acked-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/cio/device.c