diff options
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index af500aac24ef..bd6e8cf77fad 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -1059,6 +1059,8 @@ out_schedule: | |||
1059 | return 0; | 1059 | return 0; |
1060 | } | 1060 | } |
1061 | 1061 | ||
1062 | static void io_subchannel_quiesce(struct subchannel *); | ||
1063 | |||
1062 | static int | 1064 | static int |
1063 | io_subchannel_remove (struct subchannel *sch) | 1065 | io_subchannel_remove (struct subchannel *sch) |
1064 | { | 1066 | { |
@@ -1068,6 +1070,7 @@ io_subchannel_remove (struct subchannel *sch) | |||
1068 | cdev = sch_get_cdev(sch); | 1070 | cdev = sch_get_cdev(sch); |
1069 | if (!cdev) | 1071 | if (!cdev) |
1070 | goto out_free; | 1072 | goto out_free; |
1073 | io_subchannel_quiesce(sch); | ||
1071 | /* Set ccw device to not operational and drop reference. */ | 1074 | /* Set ccw device to not operational and drop reference. */ |
1072 | spin_lock_irqsave(cdev->ccwlock, flags); | 1075 | spin_lock_irqsave(cdev->ccwlock, flags); |
1073 | sch_set_cdev(sch, NULL); | 1076 | sch_set_cdev(sch, NULL); |
@@ -1150,7 +1153,7 @@ static int io_subchannel_chp_event(struct subchannel *sch, | |||
1150 | return 0; | 1153 | return 0; |
1151 | } | 1154 | } |
1152 | 1155 | ||
1153 | static void io_subchannel_shutdown(struct subchannel *sch) | 1156 | static void io_subchannel_quiesce(struct subchannel *sch) |
1154 | { | 1157 | { |
1155 | struct ccw_device *cdev; | 1158 | struct ccw_device *cdev; |
1156 | int ret; | 1159 | int ret; |
@@ -1182,6 +1185,11 @@ out_unlock: | |||
1182 | spin_unlock_irq(sch->lock); | 1185 | spin_unlock_irq(sch->lock); |
1183 | } | 1186 | } |
1184 | 1187 | ||
1188 | static void io_subchannel_shutdown(struct subchannel *sch) | ||
1189 | { | ||
1190 | io_subchannel_quiesce(sch); | ||
1191 | } | ||
1192 | |||
1185 | static int device_is_disconnected(struct ccw_device *cdev) | 1193 | static int device_is_disconnected(struct ccw_device *cdev) |
1186 | { | 1194 | { |
1187 | if (!cdev) | 1195 | if (!cdev) |