summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ncr.c
diff options
context:
space:
mode:
authordm <dm@cvs.openbsd.org>1996-09-05 23:14:01 +0000
committerdm <dm@cvs.openbsd.org>1996-09-05 23:14:01 +0000
commit183eeafb4ab0d43da59e5331c2ee06c682850b72 (patch)
tree0d05bff01f4db09fce9d01bd3befa2fdf756e81d /sys/dev/pci/ncr.c
parent90fa3a750d0cb28e8458c2d96c805eeeae976021 (diff)
se@freebsd.org: fix sync transfer negotiation.
Diffstat (limited to 'sys/dev/pci/ncr.c')
-rw-r--r--sys/dev/pci/ncr.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/sys/dev/pci/ncr.c b/sys/dev/pci/ncr.c
index 749d66e2458..121aeee02a2 100644
--- a/sys/dev/pci/ncr.c
+++ b/sys/dev/pci/ncr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ncr.c,v 1.12 1996/09/05 23:07:00 dm Exp $ */
+/* $OpenBSD: ncr.c,v 1.13 1996/09/05 23:14:00 dm Exp $ */
/* $NetBSD: ncr.c,v 1.35.4.1 1996/06/03 20:32:17 cgd Exp $ */
/**************************************************************************
@@ -5979,9 +5979,18 @@ void ncr_int_sir (ncb_p np)
/*
** Check against controller limits.
*/
- fak = (4ul * per - 1) / np->ns_sync - 3;
- if (ofs && (fak>7)) {chg = 1; ofs = 0;}
- if (!ofs) fak=7;
+ if (ofs != 0) {
+ fak = (4ul * per - 1) / np->ns_sync - 3;
+ if (fak>7) {
+ chg = 1;
+ ofs = 0;
+ }
+ }
+ if (ofs == 0) {
+ fak = 7;
+ per = 0;
+ tp->minsync = 0;
+ }
if (DEBUG_FLAGS & DEBUG_NEGO) {
PRINT_ADDR(cp->xfer);