diff options
author | Cornelia Huck <cornelia.huck@de.ibm.com> | 2006-02-11 20:55:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-12 00:41:11 -0500 |
commit | c48d865c50e8626372a52094385fb1f5a2d2a7fd (patch) | |
tree | de239992c17b2db616d9487ec8f150ddec09031e | |
parent | c0cdf1935cf328730fa068e0f39a22e6149555aa (diff) |
[PATCH] s390: fix locking in __chp_add() and s390_subchannel_remove_chpid()
Fix locking in __chp_add() and s390_subchannel_remove_chpid(): Need to
disable/enable because they are always called from a thread (and not
directly from a machine check...)
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | drivers/s390/cio/chsc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index 92be75d99a56..8cf9905d484b 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c | |||
@@ -232,7 +232,7 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) | |||
232 | return 0; | 232 | return 0; |
233 | 233 | ||
234 | mask = 0x80 >> j; | 234 | mask = 0x80 >> j; |
235 | spin_lock(&sch->lock); | 235 | spin_lock_irq(&sch->lock); |
236 | 236 | ||
237 | stsch(sch->schid, &schib); | 237 | stsch(sch->schid, &schib); |
238 | if (!schib.pmcw.dnv) | 238 | if (!schib.pmcw.dnv) |
@@ -281,10 +281,10 @@ s390_subchannel_remove_chpid(struct device *dev, void *data) | |||
281 | if (sch->driver && sch->driver->verify) | 281 | if (sch->driver && sch->driver->verify) |
282 | sch->driver->verify(&sch->dev); | 282 | sch->driver->verify(&sch->dev); |
283 | out_unlock: | 283 | out_unlock: |
284 | spin_unlock(&sch->lock); | 284 | spin_unlock_irq(&sch->lock); |
285 | return 0; | 285 | return 0; |
286 | out_unreg: | 286 | out_unreg: |
287 | spin_unlock(&sch->lock); | 287 | spin_unlock_irq(&sch->lock); |
288 | sch->lpm = 0; | 288 | sch->lpm = 0; |
289 | if (css_enqueue_subchannel_slow(sch->schid)) { | 289 | if (css_enqueue_subchannel_slow(sch->schid)) { |
290 | css_clear_subchannel_slow_list(); | 290 | css_clear_subchannel_slow_list(); |
@@ -652,7 +652,7 @@ __chp_add(struct subchannel_id schid, void *data) | |||
652 | if (!sch) | 652 | if (!sch) |
653 | /* Check if the subchannel is now available. */ | 653 | /* Check if the subchannel is now available. */ |
654 | return __chp_add_new_sch(schid); | 654 | return __chp_add_new_sch(schid); |
655 | spin_lock(&sch->lock); | 655 | spin_lock_irq(&sch->lock); |
656 | for (i=0; i<8; i++) | 656 | for (i=0; i<8; i++) |
657 | if (sch->schib.pmcw.chpid[i] == chp->id) { | 657 | if (sch->schib.pmcw.chpid[i] == chp->id) { |
658 | if (stsch(sch->schid, &sch->schib) != 0) { | 658 | if (stsch(sch->schid, &sch->schib) != 0) { |
@@ -674,7 +674,7 @@ __chp_add(struct subchannel_id schid, void *data) | |||
674 | if (sch->driver && sch->driver->verify) | 674 | if (sch->driver && sch->driver->verify) |
675 | sch->driver->verify(&sch->dev); | 675 | sch->driver->verify(&sch->dev); |
676 | 676 | ||
677 | spin_unlock(&sch->lock); | 677 | spin_unlock_irq(&sch->lock); |
678 | put_device(&sch->dev); | 678 | put_device(&sch->dev); |
679 | return 0; | 679 | return 0; |
680 | } | 680 | } |