aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/device.c
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2009-12-07 06:51:38 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 06:51:32 -0500
commit6e9a0f67deeca90c433ac40b887cee8da3bdcea2 (patch)
tree870e9fecb77bb5ee0357999363c251ebd5dbe88a /drivers/s390/cio/device.c
parent0c609fca243d456af014e92ad1caca045072dfe8 (diff)
[S390] cio: quiesce subchannel in io_subchannel_remove
Ensure that there will be no more interrupts for an unregistered device by using the same quiesce and disable loop as in io_subchannel_shutdown. Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio/device.c')
-rw-r--r--drivers/s390/cio/device.c10
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
1062static void io_subchannel_quiesce(struct subchannel *);
1063
1062static int 1064static int
1063io_subchannel_remove (struct subchannel *sch) 1065io_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
1153static void io_subchannel_shutdown(struct subchannel *sch) 1156static 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
1188static void io_subchannel_shutdown(struct subchannel *sch)
1189{
1190 io_subchannel_quiesce(sch);
1191}
1192
1185static int device_is_disconnected(struct ccw_device *cdev) 1193static int device_is_disconnected(struct ccw_device *cdev)
1186{ 1194{
1187 if (!cdev) 1195 if (!cdev)