Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bf3f837804997e5f5d9888051e9e5356961af0f2
Commit:     bf3f837804997e5f5d9888051e9e5356961af0f2
Parent:     522d8dc08b16deb51c128d544ab1cb9c621c950e
Author:     Ursula Braun <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 9 18:24:32 2008 +0100
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Sat Feb 9 18:24:39 2008 +0100

    [S390] qdio: avoid hang when establishing qdio queues
    
    If qdio establish runs in parallel with a channel error,
    ccw_device_start_timeout may not trigger the qdio_timeout_handler.
    In this case neither QDIO_IRQ_STATE_ESTABLISHED nor
    QDIO_IRQ_STATE_ERR is reached and the following wait_event hangs
    forever.
    Solution: do not make use of the timeout option with
    ccw_device_start, but add a timeout to the following wait_event.
    
    Signed-off-by: Ursula Braun <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 drivers/s390/cio/qdio.c |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/s390/cio/qdio.c b/drivers/s390/cio/qdio.c
index e2a781b..097fc09 100644
--- a/drivers/s390/cio/qdio.c
+++ b/drivers/s390/cio/qdio.c
@@ -3189,13 +3189,11 @@ qdio_establish(struct qdio_initialize *init_data)
        spin_lock_irqsave(get_ccwdev_lock(cdev),saveflags);
 
        ccw_device_set_options_mask(cdev, 0);
-       result=ccw_device_start_timeout(cdev,&irq_ptr->ccw,
-                                       QDIO_DOING_ESTABLISH,0, 0,
-                                       QDIO_ESTABLISH_TIMEOUT);
+       result = ccw_device_start(cdev, &irq_ptr->ccw,
+                               QDIO_DOING_ESTABLISH, 0, 0);
        if (result) {
-               result2=ccw_device_start_timeout(cdev,&irq_ptr->ccw,
-                                                QDIO_DOING_ESTABLISH,0,0,
-                                                QDIO_ESTABLISH_TIMEOUT);
+               result2 = ccw_device_start(cdev, &irq_ptr->ccw,
+                                       QDIO_DOING_ESTABLISH, 0, 0);
                sprintf(dbf_text,"eq:io%4x",result);
                QDIO_DBF_TEXT2(1,setup,dbf_text);
                if (result2) {
@@ -3219,10 +3217,10 @@ qdio_establish(struct qdio_initialize *init_data)
                return result;
        }
        
-       /* Timeout is cared for already by using ccw_device_start_timeout(). */
-       wait_event_interruptible(cdev->private->wait_q,
-                irq_ptr->state == QDIO_IRQ_STATE_ESTABLISHED ||
-                irq_ptr->state == QDIO_IRQ_STATE_ERR);
+       wait_event_interruptible_timeout(cdev->private->wait_q,
+               irq_ptr->state == QDIO_IRQ_STATE_ESTABLISHED ||
+               irq_ptr->state == QDIO_IRQ_STATE_ERR,
+               QDIO_ESTABLISH_TIMEOUT);
 
        if (irq_ptr->state == QDIO_IRQ_STATE_ESTABLISHED)
                result = 0;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to