From nick@luna.specialix.com  Fri Jun 12 11:13:22 1998
Received: from luna.specialix.com (6qz8LGanJNEGrMfJnxLO/Ix5ngGzqxER@luna.specialix.com [192.65.145.1])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA05887
          for <FreeBSD-gnats-submit@freebsd.org>; Fri, 12 Jun 1998 11:13:20 -0700 (PDT)
          (envelope-from nick@luna.specialix.com)
Received: from zephyr.specialix.com (zephyr.specialix.com [192.65.145.58])
	by luna.specialix.com (8.8.8/8.8.5) with ESMTP id LAA28722
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 12 Jun 1998 11:13:05 -0700 (PDT)
Received: by zephyr.specialix.com 
        (8.8.5//ident-1.0) id LAA23734; Fri, 12 Jun 1998 11:13:00 -0700 (PDT) 
Message-Id: <199806121813.LAA23734@zephyr.specialix.com>
Date: Fri, 12 Jun 1998 11:13:00 -0700 (PDT)
From: nsayer@quack.kfu.com
Reply-To: nsayer@quack.kfu.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: si driver: add SI_ISJET macro
X-Send-Pr-Version: 3.2

>Number:         6932
>Category:       kern
>Synopsis:       si driver: add SI_ISJET macro
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 12 11:20:02 PDT 1998
>Closed-Date:    Sat Jun 13 12:33:09 PDT 1998
>Last-Modified:  Sat Jun 13 12:37:50 PDT 1998
>Originator:     Nick Sayer
>Release:        FreeBSD 2.2.2-RELEASE i386
>Organization:
Specialix, Inc.
>Environment:

SI driver

>Description:

a little genericization of the driver. Preparation for adding
more sx specific functionality.

>How-To-Repeat:
>Fix:

--- /sys/i386/include/si.h-	Fri Jun 12 11:08:11 1998
+++ /sys/i386/include/si.h	Fri Jun 12 11:08:24 1998
@@ -93,6 +93,7 @@
 #define SIJETPCI	6
 #define SIJETISA	7
 
+#define SI_ISJET(x)     (((x) == SIJETPCI) || ((x) == SIJETISA))
 
 /* Buffer parameters */
 #define	SI_BUFFERSIZE	256
--- /sys/i386/isa/si.c-	Fri Jun 12 11:08:38 1998
+++ /sys/i386/isa/si.c	Fri Jun 12 11:09:17 1998
@@ -792,7 +792,7 @@
 
 	/* OK, now lets download the download code */
 
-	if ((sc->sc_type == SIJETISA) || (sc->sc_type == SIJETPCI)) {
+	if ( SI_ISJET(sc->sc_type) ) {
 		DPRINT((0, DBG_DOWNLOAD, "si%d: jet_download: nbytes %d\n",
 			id->id_unit, si3_t225_dsize));
 		si_bcopy(si3_t225_download, maddr + si3_t225_downloadaddr,
@@ -888,7 +888,7 @@
 		sc->sc_type = SIEMPTY;
 		return 0;
 	case 1:
-		if ((sc->sc_type == SIJETISA) || (sc->sc_type == SIJETPCI)) {
+		if ( SI_ISJET(sc->sc_type) ) {
 			/* set throttle to 100 times per second */
 			regp->int_count = JET_INT_COUNT;
 			/* rx_intr_count is a NOP in Jet */
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: steve 
State-Changed-When: Sat Jun 13 12:33:09 PDT 1998 
State-Changed-Why:  
Fixed in both -current and -stable.  Thanks! 
>Unformatted:
