Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jun 1998 11:13:00 -0700 (PDT)
From:      nsayer@quack.kfu.com
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   kern/6932: si driver: add SI_ISJET macro
Message-ID:  <199806121813.LAA23734@zephyr.specialix.com>

next in thread | raw e-mail | index | archive | help

>Number:         6932
>Category:       kern
>Synopsis:       si driver: add SI_ISJET macro
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 12 11:20:02 PDT 1998
>Last-Modified:
>Originator:     Nick Sayer
>Organization:
Specialix, Inc.
>Release:        FreeBSD 2.2.2-RELEASE i386
>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 */
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199806121813.LAA23734>