From 7ba403c79be58ce1ed997556ac367ec053b4752e Mon Sep 17 00:00:00 2001 From: dm Date: Thu, 5 Sep 1996 23:14:00 +0000 Subject: [PATCH] se@freebsd.org: fix sync transfer negotiation. --- sys/dev/pci/ncr.c | 17 +++++++++++++---- 1 file 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); -- 2.20.1