diff options
author | Peter Oberparleiter <peter.oberparleiter@de.ibm.com> | 2009-12-07 06:51:16 -0500 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 06:51:29 -0500 |
commit | 60e4dac1abdf49ccdb7545ec406325f08423d848 (patch) | |
tree | 4651058ef0a1ac820b0af2df0ad96dc19de069e3 /drivers/s390/cio | |
parent | 48e4c385c5f54626651cca027afe242439281899 (diff) |
[S390] cio: fix repeat setting of cdev parent association
sch_create_and_recog_new_device() associates a parent subchannel
with its ccw device child even though this is already done by
the subsequently called io_subchannel_recog(). Also make sure
io_subchannel_recog() sets the association under lock.
Signed-off-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/device.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 55f997308e42..0efecefdb83a 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -888,9 +888,6 @@ static void sch_create_and_recog_new_device(struct subchannel *sch) | |||
888 | css_sch_device_unregister(sch); | 888 | css_sch_device_unregister(sch); |
889 | return; | 889 | return; |
890 | } | 890 | } |
891 | spin_lock_irq(sch->lock); | ||
892 | sch_set_cdev(sch, cdev); | ||
893 | spin_unlock_irq(sch->lock); | ||
894 | /* Start recognition for the new ccw device. */ | 891 | /* Start recognition for the new ccw device. */ |
895 | if (io_subchannel_recog(cdev, sch)) { | 892 | if (io_subchannel_recog(cdev, sch)) { |
896 | spin_lock_irq(sch->lock); | 893 | spin_lock_irq(sch->lock); |
@@ -1107,7 +1104,6 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch) | |||
1107 | int rc; | 1104 | int rc; |
1108 | struct ccw_device_private *priv; | 1105 | struct ccw_device_private *priv; |
1109 | 1106 | ||
1110 | sch_set_cdev(sch, cdev); | ||
1111 | cdev->ccwlock = sch->lock; | 1107 | cdev->ccwlock = sch->lock; |
1112 | 1108 | ||
1113 | /* Init private data. */ | 1109 | /* Init private data. */ |
@@ -1125,6 +1121,7 @@ io_subchannel_recog(struct ccw_device *cdev, struct subchannel *sch) | |||
1125 | 1121 | ||
1126 | /* Start async. device sensing. */ | 1122 | /* Start async. device sensing. */ |
1127 | spin_lock_irq(sch->lock); | 1123 | spin_lock_irq(sch->lock); |
1124 | sch_set_cdev(sch, cdev); | ||
1128 | rc = ccw_device_recognition(cdev); | 1125 | rc = ccw_device_recognition(cdev); |
1129 | spin_unlock_irq(sch->lock); | 1126 | spin_unlock_irq(sch->lock); |
1130 | if (rc) { | 1127 | if (rc) { |