summaryrefslogtreecommitdiffstats
path: root/drivers/misc/sgi-gru/grukservices.c
diff options
context:
space:
mode:
authorJack Steiner <steiner@sgi.com>2009-06-18 01:28:29 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-18 22:04:03 +0200
commitd6e2fbce0d70c2072a1c478dbd37b34d27129d74 (patch)
treea5751ae55607dae0e9d394bf09857d15ea72c028 /drivers/misc/sgi-gru/grukservices.c
parentgru: add user request to explicitly unload a gru context (diff)
downloadlinux-d6e2fbce0d70c2072a1c478dbd37b34d27129d74.tar.xz
linux-d6e2fbce0d70c2072a1c478dbd37b34d27129d74.zip
gru: fix automatic retry of gru instruction failures
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>
Diffstat (limited to 'drivers/misc/sgi-gru/grukservices.c')
-rw-r--r--drivers/misc/sgi-gru/grukservices.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/misc/sgi-gru/grukservices.c b/drivers/misc/sgi-gru/grukservices.c
index 5078f57da882..eedbf9c32760 100644
--- a/drivers/misc/sgi-gru/grukservices.c
+++ b/drivers/misc/sgi-gru/grukservices.c
@@ -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))