diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-05-23 20:35:13 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-05-23 20:35:13 +0000 |
commit | 7b264e5d4eec18b259989ccbeecfddeaf57c4e9a (patch) | |
tree | 81ef52268a90c15e195f0be540829d54e140b8d3 /sys/dev | |
parent | da76193ff749a28c431beec7fbbfa845918a4e5b (diff) |
In NCR53C9X_DEBUG code, compute debug values after the values they depend on
have been computed.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/ncr53c9x.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/ic/ncr53c9x.c b/sys/dev/ic/ncr53c9x.c index 149ea6acbc8..2ab0144e102 100644 --- a/sys/dev/ic/ncr53c9x.c +++ b/sys/dev/ic/ncr53c9x.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr53c9x.c,v 1.30 2006/03/05 21:48:56 miod Exp $ */ +/* $OpenBSD: ncr53c9x.c,v 1.31 2006/05/23 20:35:12 miod Exp $ */ /* $NetBSD: ncr53c9x.c,v 1.56 2000/11/30 14:41:46 thorpej Exp $ */ /* @@ -88,7 +88,9 @@ #include <dev/ic/ncr53c9xreg.h> #include <dev/ic/ncr53c9xvar.h> +#ifdef NCR53C9X_DEBUG int ncr53c9x_debug = 0; /*NCR_SHOWPHASE|NCR_SHOWMISC|NCR_SHOWTRAC|NCR_SHOWCMDS;*/ +#endif #ifdef DEBUG int ncr53c9x_notag = 0; #endif @@ -1636,14 +1638,17 @@ gotit: ti->flags &= ~T_SYNCMODE; } } else { - int r = 250/ti->period; - int s = (100*250)/ti->period - 100*r; +#ifdef NCR53C9X_DEBUG + int r, s; +#endif int p; p = ncr53c9x_stp2cpb(sc, ti->period); ti->period = ncr53c9x_cpb2stp(sc, p); #ifdef NCR53C9X_DEBUG sc_print_addr(ecb->xs->sc_link); + r = 250/ti->period; + s = (100*250)/ti->period - 100*r; printf("max sync rate %d.%02dMB/s\n", r, s); #endif |