diff options
author | Peter Oberparleiter <peter.oberparleiter@de.ibm.com> | 2009-12-07 12:51:23 +0100 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2009-12-07 12:51:30 +0100 |
commit | 1f5bd3848bfc56de4c32ef6971a6a966776204bb (patch) | |
tree | 0554af8ced7ac924e9f1bbe3c92a4de52767950d /drivers/s390/cio/device.c | |
parent | 7c4d964fa4e857d6fb6b63159a898a5c63c173bf (diff) | |
download | blackbird-op-linux-1f5bd3848bfc56de4c32ef6971a6a966776204bb.tar.gz blackbird-op-linux-1f5bd3848bfc56de4c32ef6971a6a966776204bb.zip |
[S390] cio: ensure proper locking during device recognition
Device recognition needs to be started with the ccw device lock
held to prevent race conditions between I/O starting and interrupt
reception.
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/device.c')
-rw-r--r-- | drivers/s390/cio/device.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 7ad6bfb2e55e..afa362ce9e85 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c @@ -488,7 +488,9 @@ static int online_store_recog_and_online(struct ccw_device *cdev) { /* Do device recognition, if needed. */ if (cdev->private->state == DEV_STATE_BOXED) { + spin_lock_irq(cdev->ccwlock); ccw_device_recognition(cdev); + spin_unlock_irq(cdev->ccwlock); wait_event(cdev->private->wait_q, cdev->private->flags.recog_done); if (cdev->private->state != DEV_STATE_OFFLINE) |