diff options
author | chuck <chuck@cvs.openbsd.org> | 1996-08-12 20:24:07 +0000 |
---|---|---|
committer | chuck <chuck@cvs.openbsd.org> | 1996-08-12 20:24:07 +0000 |
commit | 04da103cb361ea9b303f3185a7c017a21c57856d (patch) | |
tree | 05a23091e2872c388fda0d31527f5ec6c4f59731 /sys/arch/sparc/dev/xd.c | |
parent | bdc1b2d7c445ea8597500605e3067bbc6e92ca83 (diff) |
repair XDC_HWAIT macro to handle the fact that waithead is now
unsigned. should fix xdc watchdog timeouts noted in port-sparc
by nathanw@mit.edu.
Diffstat (limited to 'sys/arch/sparc/dev/xd.c')
-rw-r--r-- | sys/arch/sparc/dev/xd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c index dd5df1fa016..70caf5e3e48 100644 --- a/sys/arch/sparc/dev/xd.c +++ b/sys/arch/sparc/dev/xd.c @@ -103,7 +103,8 @@ * XDC_HWAIT: add iorq "N" to head of SC's wait queue */ #define XDC_HWAIT(SC, N) { \ - (SC)->waithead = ((SC)->waithead - 1) % XDC_MAXIOPB; \ + (SC)->waithead = ((SC)->waithead == 0) ? \ + (XDC_MAXIOPB - 1) : ((SC)->waithead - 1); \ (SC)->waitq[(SC)->waithead] = (N); \ (SC)->nwait++; \ } |