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.
This commit is contained in:
chuck 1996-08-12 20:19:27 +00:00
parent 2ee7b67a98
commit cfdb99f44c
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: xd.c,v 1.25 1996/04/22 02:42:06 christos Exp $ */
/* $NetBSD: xd.c,v 1.26 1996/08/12 20:19:27 chuck Exp $ */
/*
*
@ -36,7 +36,7 @@
* x d . c x y l o g i c s 7 5 3 / 7 0 5 3 v m e / s m d d r i v e r
*
* author: Chuck Cranor <chuck@ccrc.wustl.edu>
* id: $NetBSD: xd.c,v 1.25 1996/04/22 02:42:06 christos Exp $
* id: $NetBSD: xd.c,v 1.26 1996/08/12 20:19:27 chuck Exp $
* started: 27-Feb-95
* references: [1] Xylogics Model 753 User's Manual
* part number: 166-753-001, Revision B, May 21, 1988.
@ -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++; \
}