summaryrefslogtreecommitdiff
path: root/sys/dev/aac
diff options
context:
space:
mode:
authorScott Long <scottl@FreeBSD.org>2003-09-16 16:07:15 +0000
committerScott Long <scottl@FreeBSD.org>2003-09-16 16:07:15 +0000
commit7753acd255b255c46ab7dedc3a8a4a8775627c50 (patch)
treee47a042f595826fcb5a908a5a8e359157919f928 /sys/dev/aac
parent855deec44c7f8c8422780eb28b5b21001750f23e (diff)
Notes
Diffstat (limited to 'sys/dev/aac')
-rw-r--r--sys/dev/aac/aac.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index 140ed9df4bf1..9389511a2e86 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -1877,7 +1877,11 @@ aac_dequeue_fib(struct aac_softc *sc, int queue, u_int32_t *fib_size,
error = ENOENT;
goto out;
}
-
+
+ /* wrap the pi so the following test works */
+ if (pi >= aac_qinfo[queue].size)
+ pi = 0;
+
notify = 0;
if (ci == pi + 1)
notify++;