diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1998-07-16 07:06:06 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1998-07-16 07:06:06 +0000 |
commit | eaf986155ab9b4ba78090ff8904f9a0a52dee302 (patch) | |
tree | b511a87a8c34f079d80a6e71a1a0b6a5310e5536 | |
parent | 128f7b61df79187fbda96ba8c35a898bf089dd39 (diff) |
MAXSTART had an implicate assumption that MAXTARGETS was 8 when it is really 16
-rw-r--r-- | sys/dev/pci/ncr.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/pci/ncr.c b/sys/dev/pci/ncr.c index 6e3f35ce8c6..ece4d6b7124 100644 --- a/sys/dev/pci/ncr.c +++ b/sys/dev/pci/ncr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ncr.c,v 1.38 1998/05/23 03:14:24 millert Exp $ */ +/* $OpenBSD: ncr.c,v 1.39 1998/07/16 07:06:05 millert Exp $ */ /* $NetBSD: ncr.c,v 1.63 1997/09/23 02:39:15 perry Exp $ */ /************************************************************************** @@ -146,8 +146,8 @@ /* ** Number of targets supported by the driver. ** n permits target numbers 0..n-1. -** Default is 7, meaning targets #0..#6. -** #7 .. is myself. +** Default is 16, meaning targets #0..#15. +** #7 is the host adapter. */ #define MAX_TARGET (16) @@ -170,7 +170,7 @@ ** The calculation below is actually quite silly ... */ -#define MAX_START (MAX_TARGET + 7 * SCSI_NCR_DFLT_TAGS) +#define MAX_START (MAX_TARGET + (MAX_TARGET - 1) * SCSI_NCR_DFLT_TAGS) /* ** The maximum number of segments a transfer is split into. @@ -1465,7 +1465,7 @@ static void ncr_attach (pcici_t tag, int unit); #if 0 static char ident[] = - "\n$OpenBSD: ncr.c,v 1.38 1998/05/23 03:14:24 millert Exp $\n"; + "\n$OpenBSD: ncr.c,v 1.39 1998/07/16 07:06:05 millert Exp $\n"; #endif static const u_long ncr_version = NCR_VERSION * 11 @@ -7281,7 +7281,8 @@ static void ncr_alloc_ccb (ncb_p np, u_long target, u_long lun) ** can use more than one ccb. */ - if (np->actccbs >= MAX_START-2) return; + if (np->actccbs >= MAX_START-2) + return; if (lp->actccbs && (lp->actccbs >= lp->reqccbs)) return; |