summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorChris Cappuccio <chris@cvs.openbsd.org>2000-02-01 18:01:43 +0000
committerChris Cappuccio <chris@cvs.openbsd.org>2000-02-01 18:01:43 +0000
commite68fb82f07f3d13d45357f91edb7ca2d5f067ba0 (patch)
treecbdd89e03bbfa209cce0f8b00a5b5c63b8a6549b /sys/dev
parent00e2d83579a628087496d77321547374d28dd089 (diff)
general cleanup (remove LMC_IOMAPPED crud entirely)
add correct rcs tags sync w/lmc's lmc_media.c regarding watchdog support (So, the LEDs on the T1/T3 cards [the ones with built-in CSU/DSUs], and also the DS1 "SSI" card should now change according to various line conditions, as ths manual says they do)
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/if_lmc.c5
-rw-r--r--sys/dev/pci/if_lmc_common.c1
-rw-r--r--sys/dev/pci/if_lmc_media.c163
-rw-r--r--sys/dev/pci/if_lmc_obsd.c6
-rw-r--r--sys/dev/pci/if_lmc_types.h5
-rw-r--r--sys/dev/pci/if_lmcioctl.h4
-rw-r--r--sys/dev/pci/if_lmcvar.h40
7 files changed, 160 insertions, 64 deletions
diff --git a/sys/dev/pci/if_lmc.c b/sys/dev/pci/if_lmc.c
index 44e98098a73..ce7e1886ae5 100644
--- a/sys/dev/pci/if_lmc.c
+++ b/sys/dev/pci/if_lmc.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: if_lmc.c,v 1.3 2000/02/01 18:01:40 chris Exp $ */
/* $NetBSD: if_lmc.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
/*-
@@ -1281,7 +1282,8 @@ lmc_ifstart_one(struct ifnet * const ifp)
ifq = &sc->lmc_p2pcom.p2p_isnd;
- m = ifq->ifq_head;
+ m = ifq->ifq_head;
+ {
if (m == NULL) {
ifq = &sc->lmc_if.if_snd;
m = ifq->ifq_head;
@@ -1291,6 +1293,7 @@ lmc_ifstart_one(struct ifnet * const ifp)
IF_DEQUEUE(ifq, m);
m = lmc_txput(sc, m);
+ }
if (m != NULL)
IF_PREPEND(ifq, m);
diff --git a/sys/dev/pci/if_lmc_common.c b/sys/dev/pci/if_lmc_common.c
index af526451bd1..e1a87595315 100644
--- a/sys/dev/pci/if_lmc_common.c
+++ b/sys/dev/pci/if_lmc_common.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: if_lmc_common.c,v 1.3 2000/02/01 18:01:41 chris Exp $ */
/* $NetBSD: if_lmc_common.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
/*-
diff --git a/sys/dev/pci/if_lmc_media.c b/sys/dev/pci/if_lmc_media.c
index f162df45fa3..46b8bdd4120 100644
--- a/sys/dev/pci/if_lmc_media.c
+++ b/sys/dev/pci/if_lmc_media.c
@@ -1,5 +1,5 @@
-/* $OpenBSD $ */
-/* $Id: if_lmc_media.c,v 1.2 1999/10/26 23:47:14 chris Exp $ */
+/* $OpenBSD: if_lmc_media.c,v 1.3 2000/02/01 18:01:41 chris Exp $ */
+/* $Id: if_lmc_media.c,v 1.3 2000/02/01 18:01:41 chris Exp $ */
/*-
* Copyright (c) 1997-1999 LAN Media Corporation (LMC)
@@ -170,6 +170,7 @@ static void lmc_ds3_set_100ft(lmc_softc_t * const, int);
static int lmc_ds3_get_link_status(lmc_softc_t * const);
static void lmc_ds3_set_crc_length(lmc_softc_t * const, int);
static void lmc_ds3_set_scram(lmc_softc_t * const, int);
+static void lmc_ds3_watchdog(lmc_softc_t * const);
static void lmc_hssi_init(lmc_softc_t * const);
static void lmc_hssi_default(lmc_softc_t * const);
@@ -178,6 +179,7 @@ static void lmc_hssi_set_clock(lmc_softc_t * const, int);
static int lmc_hssi_get_link_status(lmc_softc_t * const);
static void lmc_hssi_set_link_status(lmc_softc_t * const, int);
static void lmc_hssi_set_crc_length(lmc_softc_t * const, int);
+static void lmc_hssi_watchdog(lmc_softc_t * const);
static void lmc_ssi_init(lmc_softc_t * const);
static void lmc_ssi_default(lmc_softc_t * const);
@@ -187,6 +189,7 @@ static void lmc_ssi_set_speed(lmc_softc_t * const, lmc_ctl_t *);
static int lmc_ssi_get_link_status(lmc_softc_t * const);
static void lmc_ssi_set_link_status(lmc_softc_t * const, int);
static void lmc_ssi_set_crc_length(lmc_softc_t * const, int);
+static void lmc_ssi_watchdog(lmc_softc_t * const);
static void lmc_t1_init(lmc_softc_t * const);
static void lmc_t1_default(lmc_softc_t * const);
@@ -194,6 +197,8 @@ static void lmc_t1_set_status(lmc_softc_t * const, lmc_ctl_t *);
static int lmc_t1_get_link_status(lmc_softc_t * const);
static void lmc_t1_set_circuit_type(lmc_softc_t * const, int);
static void lmc_t1_set_crc_length(lmc_softc_t * const, int);
+static void lmc_t1_set_clock(lmc_softc_t * const, int);
+static void lmc_t1_watchdog(lmc_softc_t * const);
static void lmc_dummy_set_1(lmc_softc_t * const, int);
static void lmc_dummy_set2_1(lmc_softc_t * const, lmc_ctl_t *);
@@ -213,7 +218,8 @@ lmc_media_t lmc_ds3_media = {
lmc_ds3_get_link_status, /* get link status */
lmc_dummy_set_1, /* set link status */
lmc_ds3_set_crc_length, /* set CRC length */
- lmc_dummy_set_1 /* set T1 or E1 circuit type */
+ lmc_dummy_set_1, /* set T1 or E1 circuit type */
+ lmc_ds3_watchdog
};
lmc_media_t lmc_hssi_media = {
@@ -227,7 +233,8 @@ lmc_media_t lmc_hssi_media = {
lmc_hssi_get_link_status, /* get link status */
lmc_hssi_set_link_status, /* set link status */
lmc_hssi_set_crc_length, /* set CRC length */
- lmc_dummy_set_1 /* set T1 or E1 circuit type */
+ lmc_dummy_set_1, /* set T1 or E1 circuit type */
+ lmc_hssi_watchdog
};
lmc_media_t lmc_ssi_media = {
@@ -241,21 +248,23 @@ lmc_media_t lmc_ssi_media = {
lmc_ssi_get_link_status, /* get link status */
lmc_ssi_set_link_status, /* set link status */
lmc_ssi_set_crc_length, /* set CRC length */
- lmc_dummy_set_1 /* set T1 or E1 circuit type */
+ lmc_dummy_set_1, /* set T1 or E1 circuit type */
+ lmc_ssi_watchdog
};
lmc_media_t lmc_t1_media = {
lmc_t1_init, /* special media init stuff */
lmc_t1_default, /* reset to default state */
lmc_t1_set_status, /* reset status to state provided */
- lmc_dummy_set_1, /* set clock source */
- lmc_dummy_set2_1, /* set line speed */
+ lmc_t1_set_clock, /* set clock source */
+ lmc_dummy_set2_1, /* set line speed */
lmc_dummy_set_1, /* set cable length */
lmc_dummy_set_1, /* set scrambler */
lmc_t1_get_link_status, /* get link status */
- lmc_dummy_set_1, /* set link status */
+ lmc_dummy_set_1, /* set link status */
lmc_t1_set_crc_length, /* set CRC length */
- lmc_t1_set_circuit_type /* set T1 or E1 circuit type */
+ lmc_t1_set_circuit_type, /* set T1 or E1 circuit type */
+ lmc_t1_watchdog
};
static void
@@ -285,7 +294,7 @@ lmc_hssi_default(lmc_softc_t * const sc)
{
sc->lmc_miireg16 = LMC_MII16_LED_ALL;
- sc->lmc_media->set_link_status(sc, 0);
+ sc->lmc_media->set_link_status(sc, LMC_LINK_DOWN);
sc->lmc_media->set_clock_source(sc, LMC_CTL_CLOCK_SOURCE_EXT);
sc->lmc_media->set_crc_length(sc, LMC_CTL_CRC_LENGTH_16);
}
@@ -359,7 +368,7 @@ lmc_hssi_get_link_status(lmc_softc_t * const sc)
static void
lmc_hssi_set_link_status(lmc_softc_t * const sc, int state)
{
- if (state)
+ if (state == LMC_LINK_UP)
sc->lmc_miireg16 |= LMC_MII16_HSSI_TA;
else
sc->lmc_miireg16 &= ~LMC_MII16_HSSI_TA;
@@ -386,6 +395,22 @@ lmc_hssi_set_crc_length(lmc_softc_t * const sc, int state)
lmc_mii_writereg(sc, 0, 16, sc->lmc_miireg16);
}
+static void
+lmc_hssi_watchdog (lmc_softc_t * const sc)
+{
+ /* HSSI is blank */
+}
+
+static void
+lmc_ds3_watchdog (lmc_softc_t * const sc)
+{
+ sc->lmc_miireg16 = lmc_mii_readreg (sc, 0, 16);
+ if (sc->lmc_miireg16 & 0x0018)
+ {
+ printf("%s: AIS Recieved\n", sc->lmc_xname);
+ lmc_led_on (sc, LMC_DS3_LED1 | LMC_DS3_LED2);
+ }
+}
/*
* DS3 methods
@@ -412,7 +437,7 @@ lmc_ds3_default(lmc_softc_t * const sc)
{
sc->lmc_miireg16 = LMC_MII16_LED_ALL;
- sc->lmc_media->set_link_status(sc, 0);
+ sc->lmc_media->set_link_status(sc, LMC_LINK_DOWN);
sc->lmc_media->set_cable_length(sc, LMC_CTL_CABLE_LENGTH_LT_100FT);
sc->lmc_media->set_scrambler(sc, LMC_CTL_OFF);
sc->lmc_media->set_crc_length(sc, LMC_CTL_CRC_LENGTH_16);
@@ -566,7 +591,7 @@ lmc_ssi_default(lmc_softc_t * const sc)
*/
lmc_gpio_mkoutput(sc, LMC_GEP_SSI_TXCLOCK);
- sc->lmc_media->set_link_status(sc, 0);
+ sc->lmc_media->set_link_status(sc, LMC_LINK_DOWN);
sc->lmc_media->set_clock_source(sc, LMC_CTL_CLOCK_SOURCE_EXT);
sc->lmc_media->set_speed(sc, NULL);
sc->lmc_media->set_crc_length(sc, LMC_CTL_CRC_LENGTH_16);
@@ -705,7 +730,7 @@ lmc_ssi_get_link_status(lmc_softc_t * const sc)
static void
lmc_ssi_set_link_status(lmc_softc_t * const sc, int state)
{
- if (state) {
+ if (state == LMC_LINK_UP) {
sc->lmc_miireg16 |= (LMC_MII16_SSI_DTR | LMC_MII16_SSI_RTS);
printf(LMC_PRINTF_FMT ": asserting DTR and RTS\n",
LMC_PRINTF_ARGS);
@@ -820,6 +845,27 @@ write_av9110(lmc_softc_t *sc, u_int32_t n, u_int32_t m, u_int32_t v,
| LMC_GEP_SSI_GENERATOR));
}
+static void
+lmc_ssi_watchdog (lmc_softc_t * const sc)
+{
+ u_int16_t mii17;
+ struct ssicsr2 {
+ unsigned short dtr:1, dsr:1, rts:1, cable:3, crc:1, led0:1,
+ led1:1, led2:1, led3:1, fifo:1, ll:1, rl:1, tm:1, loop:1;
+ };
+ struct ssicsr2 *ssicsr;
+ mii17 = lmc_mii_readreg (sc, 0, 17);
+ ssicsr = (struct ssicsr2 *) &mii17;
+ if (ssicsr->cable == 7) {
+ lmc_led_off (sc, LMC_MII16_LED2);
+ }
+ else {
+ lmc_led_on (sc, LMC_MII16_LED2);
+ }
+
+}
+
+
/*
* T1 methods
*/
@@ -833,14 +879,11 @@ static void lmc_t1_write(lmc_softc_t * const sc, int a, int d)
lmc_mii_writereg(sc, 0, 18, d);
}
-/* XXX future to be integtrated with if_lmc.c for alarms
static int lmc_t1_read(lmc_softc_t * const sc, int a)
{
lmc_mii_writereg(sc, 0, 17, a);
return lmc_mii_readreg(sc, 0, 18);
}
-*/
-
static void
lmc_t1_init(lmc_softc_t * const sc)
@@ -908,7 +951,7 @@ static void
static void lmc_t1_default(lmc_softc_t * const sc)
{
sc->lmc_miireg16 = LMC_MII16_LED_ALL;
- sc->lmc_media->set_link_status(sc, 0);
+ sc->lmc_media->set_link_status(sc, LMC_LINK_DOWN);
sc->lmc_media->set_circuit_type(sc, LMC_CTL_CIRCUIT_TYPE_T1);
sc->lmc_media->set_crc_length(sc, LMC_CTL_CRC_LENGTH_16);
}
@@ -966,12 +1009,12 @@ lmc_t1_get_link_status(lmc_softc_t * const sc){
{
if( link_status & T1F_RAIS )
{ /* turn on blue LED */
- printf(" link status: RAIS turn ON Blue %x\n", link_status ); /* DEBUG */
+ printf("%s: link status: RAIS turn ON Blue %x\n", sc->lmc_xname, link_status); /* DEBUG */
lmc_led_on(sc, LMC_DS3_LED1);
}
else
{ /* turn off blue LED */
- printf(" link status: RAIS turn OFF Blue %x\n", link_status ); /* DEBUG */
+ printf("%s: link status: RAIS turn OFF Blue %x\n", sc->lmc_xname, link_status ); /* DEBUG */
lmc_led_off(sc, LMC_DS3_LED1);
}
}
@@ -986,14 +1029,14 @@ lmc_t1_get_link_status(lmc_softc_t * const sc){
if( (link_status & (T1F_RYEL | T1F_RMYEL)) == 0 )
{
/* turn off yellow LED */
- printf(" link status: RYEL turn OFF Yellow %x\n", link_status ); /* DEBUG */
+ printf("%s: link status: RYEL turn OFF Yellow %x\n", sc->lmc_xname, link_status); /* DEBUG */
lmc_led_off(sc, LMC_DS3_LED0);
}
else
{
/* turn on yellow LED */
- printf(" link status: RYEL turn ON Yellow %x\n", link_status ); /* DEBUG */
+ printf("%s: link status: RYEL turn ON Yellow %x\n", sc->lmc_xname, link_status); /* DEBUG */
lmc_led_on(sc, LMC_DS3_LED0);
}
}
@@ -1050,6 +1093,82 @@ static void
lmc_mii_writereg(sc, 0, 16, sc->lmc_miireg16);
}
+/*
+ * 1 == internal, 0 == external
+ */
+static void
+lmc_t1_set_clock (lmc_softc_t * const sc, int ie)
+{
+ if (ie == LMC_CTL_CLOCK_SOURCE_EXT) {
+ sc->lmc_gpio &= ~(LMC_GEP_SSI_TXCLOCK);
+ LMC_CSR_WRITE (sc, csr_gp, sc->lmc_gpio);
+ sc->ictl.clock_source = LMC_CTL_CLOCK_SOURCE_EXT;
+ printf (LMC_PRINTF_FMT ": clock external\n", LMC_PRINTF_ARGS);
+ }
+ else {
+ sc->lmc_gpio |= LMC_GEP_SSI_TXCLOCK;
+ LMC_CSR_WRITE (sc, csr_gp, sc->lmc_gpio);
+ sc->ictl.clock_source = LMC_CTL_CLOCK_SOURCE_INT;
+ printf (LMC_PRINTF_FMT ": clock internal\n", LMC_PRINTF_ARGS);
+ }
+}
+
+static void
+lmc_t1_watchdog(lmc_softc_t * const sc)
+{
+ int t1stat;
+
+ /* read alarm 1 status (recieve) */
+ t1stat = lmc_t1_read (sc, 0x47);
+ /* blue alarm -- RAIS */
+ if (t1stat & 0x08) {
+ if (sc->lmc_blue != 1)
+ printf ("%s: AIS Recieved\n", sc->lmc_xname);
+ lmc_led_on (sc, LMC_DS3_LED1 | LMC_DS3_LED2);
+ sc->lmc_blue = 1;
+ } else {
+ if (sc->lmc_blue == 1)
+ printf ("%s: AIS ok\n", sc->lmc_xname);
+ lmc_led_off (sc, LMC_DS3_LED1);
+ lmc_led_on (sc, LMC_DS3_LED2);
+ sc->lmc_blue = 0;
+ }
+
+ /* Red alarm -- LOS | LOF */
+ if (t1stat & 0x04) {
+ /* Only print the error once */
+ if (sc->lmc_red != 1)
+ printf ("%s: Red Alarm\n", sc->lmc_xname);
+ lmc_led_on (sc, LMC_DS3_LED2 | LMC_DS3_LED3);
+ sc->lmc_red = 1;
+ } else {
+ if (sc->lmc_red == 1)
+ printf ("%s: Red Alarm ok", sc->lmc_xname);
+ lmc_led_off (sc, LMC_DS3_LED3);
+ lmc_led_on (sc, LMC_DS3_LED2);
+ sc->lmc_red = 0;
+ }
+
+ /* check for Recieve Multiframe Yellow Alarm
+ * Ignore Recieve Yellow Alarm
+ */
+ if (t1stat & 0x80) {
+ if (sc->lmc_yel != 1) {
+ printf ("%s: Recieve Yellow Alarm\n", sc->lmc_xname);
+ }
+ lmc_led_on (sc, LMC_DS3_LED0 | LMC_DS3_LED2);
+ sc->lmc_yel = 1;
+ }
+ else {
+ if (sc->lmc_yel == 1)
+ printf ("%s: Yellow Alarm ok\n", sc->lmc_xname);
+ lmc_led_off (sc, LMC_DS3_LED0);
+ lmc_led_on (sc, LMC_DS3_LED2);
+ sc->lmc_yel = 0;
+ }
+}
+
+
static void
lmc_set_protocol(lmc_softc_t * const sc, lmc_ctl_t *ctl)
{
diff --git a/sys/dev/pci/if_lmc_obsd.c b/sys/dev/pci/if_lmc_obsd.c
index 37e348bb061..29c0a35317a 100644
--- a/sys/dev/pci/if_lmc_obsd.c
+++ b/sys/dev/pci/if_lmc_obsd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD $ */
+/* $OpenBSD: if_lmc_obsd.c,v 1.5 2000/02/01 18:01:41 chris Exp $ */
/* $NetBSD: if_lmc_nbsd.c,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
/*-
@@ -234,7 +234,7 @@ lmc_pci_attach(struct device * const parent,
u_int32_t revinfo, cfdainfo, id, ssid;
pci_intr_handle_t intrhandle;
const char *intrstr;
-#if !defined(LMC_IOMAPPED)
+#if 0
vm_offset_t pa_csrs;
#endif
unsigned csroffset = LMC_PCI_CSROFFSET;
@@ -341,7 +341,7 @@ lmc_pci_attach(struct device * const parent,
sc->lmc_media->defaults(sc);
- sc->lmc_media->set_link_status(sc, 0); /* down */
+ sc->lmc_media->set_link_status(sc, LMC_LINK_DOWN); /* down */
/*
* Make sure there won't be any interrupts or such...
diff --git a/sys/dev/pci/if_lmc_types.h b/sys/dev/pci/if_lmc_types.h
index 8858f1c9b05..db468cfaee5 100644
--- a/sys/dev/pci/if_lmc_types.h
+++ b/sys/dev/pci/if_lmc_types.h
@@ -1,3 +1,4 @@
+/* $OpenBSD: if_lmc_types.h,v 1.2 2000/02/01 18:01:42 chris Exp $ */
/* $NetBSD: if_lmc_types.h,v 1.2 1999/03/25 04:09:33 explorer Exp $ */
/*-
@@ -58,12 +59,8 @@
#if defined(__NetBSD__) || defined(__OpenBSD__)
typedef bus_addr_t lmc_csrptr_t;
#else
-#ifdef LMC_IOMAPPED
-typedef u_int16_t lmc_csrptr_t;
-#else
typedef volatile u_int32_t *lmc_csrptr_t;
#endif
-#endif
#if defined(__NetBSD__) || defined(__OpenBSD__)
#define lmc_intrfunc_t int
diff --git a/sys/dev/pci/if_lmcioctl.h b/sys/dev/pci/if_lmcioctl.h
index dbd98942bba..74a91aeb5c5 100644
--- a/sys/dev/pci/if_lmcioctl.h
+++ b/sys/dev/pci/if_lmcioctl.h
@@ -1,4 +1,5 @@
-/* $Id: if_lmcioctl.h,v 1.2 1999/10/26 23:47:15 chris Exp $ */
+/* $OpenBSD: if_lmcioctl.h,v 1.3 2000/02/01 18:01:42 chris Exp $ */
+/* $Id: if_lmcioctl.h,v 1.3 2000/02/01 18:01:42 chris Exp $ */
/*
* Copyright (c) 1997-1999 LAN Media Corporation (LMC)
@@ -308,6 +309,7 @@ struct lmc___media {
void (* set_link_status)(lmc_softc_t * const, int);
void (* set_crc_length)(lmc_softc_t * const, int);
void (* set_circuit_type)(lmc_softc_t * const, int);
+ void (* watchdog)(lmc_softc_t * const);
};
u_int32_t lmc_mii_readreg(lmc_softc_t * const sc, u_int32_t devaddr,
diff --git a/sys/dev/pci/if_lmcvar.h b/sys/dev/pci/if_lmcvar.h
index bd85a8e07ce..115b449ab7a 100644
--- a/sys/dev/pci/if_lmcvar.h
+++ b/sys/dev/pci/if_lmcvar.h
@@ -1,3 +1,4 @@
+/* $OpenBSD: if_lmcvar.h,v 1.3 2000/02/01 18:01:42 chris Exp $ */
/* $NetBSD: if_lmcvar.h,v 1.1 1999/03/25 03:32:43 explorer Exp $ */
/*-
@@ -62,22 +63,11 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if !defined(_DEVAR_H)
-#define _DEVAR_H
-
#define LMC_MTU 1500
#define PPP_HEADER_LEN 4
#define BIG_PACKET
/*
- * Intel CPUs should use I/O mapped access. XXXMLG Is this true on NetBSD
- * too?
- */
-#if defined(__i386__)
-#define LMC_IOMAPPED
-#endif
-
-/*
* This turns on all sort of debugging stuff and make the
* driver much larger.
*/
@@ -141,12 +131,6 @@
bus_space_write_1((sc)->lmc_bustag, (sc)->lmc_bushandle, (sc)->lmc_csrs.csr, (val))
#endif /* __NetBSD__ */
-#ifdef LMC_IOMAPPED
-#define LMC_EISA_CSRSIZE 16
-#define LMC_EISA_CSROFFSET 0
-#define LMC_PCI_CSRSIZE 8
-#define LMC_PCI_CSROFFSET 0
-
#if !defined(__NetBSD__) && !defined(__OpenBSD__)
#define LMC_CSR_READ(sc, csr) (inl((sc)->lmc_csrs.csr))
#define LMC_CSR_WRITE(sc, csr, val) outl((sc)->lmc_csrs.csr, val)
@@ -155,8 +139,6 @@
#define LMC_CSR_WRITEBYTE(sc, csr, val) outb((sc)->lmc_csrs.csr, val)
#endif /* __NetBSD__ */
-#else /* LMC_IOMAPPED */
-
#define LMC_PCI_CSRSIZE 8
#define LMC_PCI_CSROFFSET 0
@@ -170,12 +152,9 @@
#define LMC_CSR_WRITE(sc, csr, val) ((void)(*(sc)->lmc_csrs.csr = (val)))
#endif /* __NetBSD__ */
-#endif /* LMC_IOMAPPED */
-
/*
* This structure contains "pointers" for the registers on
- * the various 21x4x chips. CSR0 through CSR8 are common
- * to all chips. After that, it gets messy...
+ * the various 21x4x chips.
*/
typedef struct {
lmc_csrptr_t csr_busmode; /* CSR0 */
@@ -187,7 +166,7 @@ typedef struct {
lmc_csrptr_t csr_command; /* CSR6 */
lmc_csrptr_t csr_intr; /* CSR7 */
lmc_csrptr_t csr_missed_frames; /* CSR8 */
- lmc_csrptr_t csr_9; /* CSR9 */
+ lmc_csrptr_t csr_9; /* CSR9 */
lmc_csrptr_t csr_10; /* CSR10 */
lmc_csrptr_t csr_11; /* CSR11 */
lmc_csrptr_t csr_12; /* CSR12 */
@@ -258,11 +237,8 @@ struct lmc_ringinfo {
#define LMC_RX_BUFLEN ((MCLBYTES < 2048 ? MCLBYTES : 2048) - 16)
-/*
- * The various controllers support. Technically the DE425 is just
- * a 21040 on EISA. But since it remarkably difference from normal
- * 21040s, we give it its own chip id.
- */
+#define LMC_LINK_UP 1
+#define LMC_LINK_DOWN 0
typedef enum {
LMC_21140, LMC_21140A,
@@ -373,6 +349,7 @@ struct lmc___softc {
#endif
u_int32_t lmc_crcSize;
+ char lmc_yel, lmc_blue, lmc_red; /* for T1 and DS3 */
char lmc_timing; /* for HSSI and SSI */
u_int16_t t1_alarm1_status;
u_int16_t t1_alarm2_status;
@@ -468,8 +445,7 @@ static const char * const lmc_status_bits[] = {
};
/*
- * This driver supports a maximum of 32 tulip boards.
- * This should be enough for the forseeable future.
+ * This driver supports a maximum of 32 devices.
*/
#define LMC_MAX_DEVICES 32
@@ -610,5 +586,3 @@ extern struct cfdriver lmc_cd;
&& ((u_int16_t *)a1)[2] == 0xFFFFU)
typedef int lmc_spl_t;
-
-#endif /* !defined(_DEVAR_H) */