summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/chsc.c
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2006-02-11 17:55:57 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-02-11 21:41:11 -0800
commitc48d865c50e8626372a52094385fb1f5a2d2a7fd (patch)
treede239992c17b2db616d9487ec8f150ddec09031e /drivers/s390/cio/chsc.c
parentc0cdf1935cf328730fa068e0f39a22e6149555aa (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>
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r--drivers/s390/cio/chsc.c10
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)
return 0;
mask = 0x80 >> j;
- spin_lock(&sch->lock);
+ spin_lock_irq(&sch->lock);
stsch(sch->schid, &schib);
if (!schib.pmcw.dnv)
@@ -281,10 +281,10 @@ s390_subchannel_remove_chpid(struct device *dev, void *data)
if (sch->driver && sch->driver->verify)
sch->driver->verify(&sch->dev);
out_unlock:
- spin_unlock(&sch->lock);
+ spin_unlock_irq(&sch->lock);
return 0;
out_unreg:
- spin_unlock(&sch->lock);
+ spin_unlock_irq(&sch->lock);
sch->lpm = 0;
if (css_enqueue_subchannel_slow(sch->schid)) {
css_clear_subchannel_slow_list();
@@ -652,7 +652,7 @@ __chp_add(struct subchannel_id schid, void *data)
if (!sch)
/* Check if the subchannel is now available. */
return __chp_add_new_sch(schid);
- spin_lock(&sch->lock);
+ spin_lock_irq(&sch->lock);
for (i=0; i<8; i++)
if (sch->schib.pmcw.chpid[i] == chp->id) {
if (stsch(sch->schid, &sch->schib) != 0) {
@@ -674,7 +674,7 @@ __chp_add(struct subchannel_id schid, void *data)
if (sch->driver && sch->driver->verify)
sch->driver->verify(&sch->dev);
- spin_unlock(&sch->lock);
+ spin_unlock_irq(&sch->lock);
put_device(&sch->dev);
return 0;
}