gru: fix automatic retry of gru instruction failures
authorJack Steiner <steiner@sgi.com>
Wed, 17 Jun 2009 23:28:29 +0000 (16:28 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 18 Jun 2009 20:04:03 +0000 (13:04 -0700)
Fix bug in automatic retry of GRU instruction failures.  CBR substatus
(message queue failure) was being checked incorrectly.

Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/misc/sgi-gru/grukservices.c

index 5078f57da882889827ddec6d71914598325d640d..eedbf9c32760f68b76a34726a8358244e1834389 100644 (file)
@@ -436,11 +436,10 @@ static int gru_retry_exception(void *cb)
        int retry = EXCEPTION_RETRY_LIMIT;
 
        while (1)  {
-               if (gru_get_cb_message_queue_substatus(cb))
-                       break;
                if (gru_wait_idle_or_exception(gen) == CBS_IDLE)
                        return CBS_IDLE;
-
+               if (gru_get_cb_message_queue_substatus(cb))
+                       return CBS_EXCEPTION;
                gru_get_cb_exception_detail(cb, &excdet);
                if ((excdet.ecause & ~EXCEPTION_RETRY_BITS) ||
                                (excdet.cbrexecstatus & CBR_EXS_ABORT_OCC))