summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/re.c6
-rw-r--r--sys/dev/ic/rtl81x9reg.h5
2 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/ic/re.c b/sys/dev/ic/re.c
index b0076b89f5c..cd59c545fdf 100644
--- a/sys/dev/ic/re.c
+++ b/sys/dev/ic/re.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: re.c,v 1.73 2007/06/06 22:02:31 pvalchev Exp $ */
+/* $OpenBSD: re.c,v 1.74 2007/07/16 19:15:01 millert Exp $ */
/* $FreeBSD: if_re.c,v 1.31 2004/09/04 07:54:05 ru Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -826,10 +826,10 @@ re_attach(struct rl_softc *sc, const char *intrstr)
/* Reset the adapter. */
re_reset(sc);
- sc->rl_eewidth = 6;
+ sc->rl_eewidth = RL_9356_ADDR_LEN;
re_read_eeprom(sc, (caddr_t)&re_did, 0, 1);
if (re_did != 0x8129)
- sc->rl_eewidth = 8;
+ sc->rl_eewidth = RL_9346_ADDR_LEN;
/*
* Get station address from the EEPROM.
diff --git a/sys/dev/ic/rtl81x9reg.h b/sys/dev/ic/rtl81x9reg.h
index d847b4bf5a5..2720b106ec7 100644
--- a/sys/dev/ic/rtl81x9reg.h
+++ b/sys/dev/ic/rtl81x9reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtl81x9reg.h,v 1.39 2007/06/06 22:02:31 pvalchev Exp $ */
+/* $OpenBSD: rtl81x9reg.h,v 1.40 2007/07/16 19:15:01 millert Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -311,6 +311,9 @@
/* 9346/9356 EEPROM commands */
+#define RL_9346_ADDR_LEN 6 /* 93C46 1K: 128x16 */
+#define RL_9356_ADDR_LEN 8 /* 93C56 2K: 256x16 */
+
#define RL_9346_WRITE 0x5
#define RL_9346_READ 0x6
#define RL_9346_ERASE 0x7