From deb4f83f3c5c8bb6dc57cd8909f778fb69ab183a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Sat, 21 Dec 1996 12:32:34 +0000 Subject: [PATCH] Improve negotiation messages: Print MB/s instead of MHz (now takes WIDE into account). Remove extranous "\n" from WIDE negotiation messages. --- sys/pci/ncr.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/pci/ncr.c b/sys/pci/ncr.c index 21a6d87d6ed..f729b1e28a8 100644 --- a/sys/pci/ncr.c +++ b/sys/pci/ncr.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: ncr.c,v 1.88 1996/12/15 23:25:50 se Exp $ +** $Id: ncr.c,v 1.89 1996/12/16 14:31:45 se Exp $ ** ** Device driver for the NCR 53C810 PCI-SCSI-Controller. ** @@ -1261,7 +1261,7 @@ static void ncr_attach (pcici_t tag, int unit); static char ident[] = - "\n$Id: ncr.c,v 1.88 1996/12/15 23:25:50 se Exp $\n"; + "\n$Id: ncr.c,v 1.89 1996/12/16 14:31:45 se Exp $\n"; static const u_long ncr_version = NCR_VERSION * 11 + (u_long) sizeof (struct ncb) * 7 @@ -4620,14 +4620,14 @@ static void ncr_setsync (ncb_p np, ccb_p cp, u_char sxfer) */ PRINT_ADDR(xp); if (sxfer & 0x1f) { + unsigned f10 = 10000 << (tp->widedone ? tp->widedone -1 : 0); + unsigned mb10 = (f10 + tp->period/2) / tp->period; /* ** Disable extended Sreq/Sack filtering */ if (tp->period <= 200) OUTB (nc_stest2, 0); - printf ("%s%dns (%d MHz) offset %d.\n", - tp->period<200 ? "FAST SCSI-2 ":"", - tp->period, (1000+tp->period/2)/tp->period, - sxfer & 0x1f); + printf ("%d.%d MB/s (%d ns, offset %d)\n", + mb10 / 10, mb10 % 10, tp->period, sxfer & 0x1f); } else printf ("asynchronous.\n"); /* @@ -4678,9 +4678,9 @@ static void ncr_setwide (ncb_p np, ccb_p cp, u_char wide) */ PRINT_ADDR(xp); if (scntl3 & EWS) - printf ("WIDE SCSI (16 bit) enabled.\n"); + printf ("WIDE SCSI (16 bit) enabled"); else - printf ("WIDE SCSI disabled.\n"); + printf ("WIDE SCSI disabled"); /* ** set actual value and sync_status