summaryrefslogtreecommitdiffstats
path: root/sys/dev/fe
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-02-20 19:33:13 +0000
committerimp <imp@FreeBSD.org>2005-02-20 19:33:13 +0000
commit15e5121111f082d2b6a5fcaac8cfcb1ffd72f99d (patch)
treea8e69409b7b0f928f63e059ec6c154a074773863 /sys/dev/fe
parent8e7bdc9145b7c6ed1a958f035535341f009ae75c (diff)
downloadFreeBSD-src-15e5121111f082d2b6a5fcaac8cfcb1ffd72f99d.zip
FreeBSD-src-15e5121111f082d2b6a5fcaac8cfcb1ffd72f99d.tar.gz
Forced commit after moving mb86960.h from i386/isa/ic to dev/fe. It
is only used by the fe driver, and isn't MD.
Diffstat (limited to 'sys/dev/fe')
-rw-r--r--sys/dev/fe/if_fe.c8
-rw-r--r--sys/dev/fe/if_fe_cbus.c2
-rw-r--r--sys/dev/fe/if_fe_isa.c2
-rw-r--r--sys/dev/fe/if_fe_pccard.c20
4 files changed, 22 insertions, 10 deletions
diff --git a/sys/dev/fe/if_fe.c b/sys/dev/fe/if_fe.c
index e4e39a6..3e344cf 100644
--- a/sys/dev/fe/if_fe.c
+++ b/sys/dev/fe/if_fe.c
@@ -92,7 +92,7 @@ __FBSDID("$FreeBSD$");
#include <net/bpf.h>
-#include <i386/isa/ic/mb86960.h>
+#include <dev/fe/mb86960.h>
#include <dev/fe/if_fereg.h>
#include <dev/fe/if_fevar.h>
@@ -220,9 +220,13 @@ fe_simple_probe (struct fe_softc const * sc,
struct fe_simple_probe_struct const * sp)
{
struct fe_simple_probe_struct const *p;
+ int8_t bits;
for (p = sp; p->mask != 0; p++) {
- if ((fe_inb(sc, p->port) & p->mask) != p->bits)
+ bits = fe_inb(sc, p->port);
+ printf("port %d, mask %x, bits %x read %x\n", p->port,
+ p->mask, p->bits, bits);
+ if ((bits & p->mask) != p->bits)
return 0;
}
return 1;
diff --git a/sys/dev/fe/if_fe_cbus.c b/sys/dev/fe/if_fe_cbus.c
index f356243..9e373c2 100644
--- a/sys/dev/fe/if_fe_cbus.c
+++ b/sys/dev/fe/if_fe_cbus.c
@@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <i386/isa/ic/mb86960.h>
+#include <dev/fe/mb86960.h>
#include <dev/fe/if_fereg.h>
#include <dev/fe/if_fevar.h>
diff --git a/sys/dev/fe/if_fe_isa.c b/sys/dev/fe/if_fe_isa.c
index 940be5b..6372291 100644
--- a/sys/dev/fe/if_fe_isa.c
+++ b/sys/dev/fe/if_fe_isa.c
@@ -42,7 +42,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <i386/isa/ic/mb86960.h>
+#include <dev/fe/mb86960.h>
#include <dev/fe/if_fereg.h>
#include <dev/fe/if_fevar.h>
diff --git a/sys/dev/fe/if_fe_pccard.c b/sys/dev/fe/if_fe_pccard.c
index b887620..b16d128 100644
--- a/sys/dev/fe/if_fe_pccard.c
+++ b/sys/dev/fe/if_fe_pccard.c
@@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$");
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#include <i386/isa/ic/mb86960.h>
+#include <dev/fe/mb86960.h>
#include <dev/fe/if_fereg.h>
#include <dev/fe/if_fevar.h>
@@ -276,7 +276,7 @@ fe_probe_tdk (device_t dev, const struct fe_pccard_product *pp)
struct fe_softc *sc = device_get_softc(dev);
static struct fe_simple_probe_struct probe_table [] = {
- { FE_DLCR2, 0x50, 0x00 },
+ { FE_DLCR2, 0x10, 0x00 },
{ FE_DLCR4, 0x08, 0x00 },
/* { FE_DLCR5, 0x80, 0x00 }, Does not work well. */
{ 0 }
@@ -289,11 +289,16 @@ fe_probe_tdk (device_t dev, const struct fe_pccard_product *pp)
/* Fill the softc struct with default values. */
fe_softc_defaults(sc);
+ device_printf(dev, "Ident register says card is type 0x%x\n",
+ fe_inb(sc, FE_DLCR7));
+
/*
* See if C-NET(PC)C is on its address.
*/
- if (!fe_simple_probe(sc, probe_table))
- return ENXIO;
+ if (!fe_simple_probe(sc, probe_table)) {
+ printf("simple probe failed\n");
+ return ENXIO;
+ }
/* Determine the card type. */
sc->type = FE_TYPE_TDK;
@@ -302,8 +307,11 @@ fe_probe_tdk (device_t dev, const struct fe_pccard_product *pp)
pccard_get_ether(dev, sc->sc_enaddr);
/* Make sure we got a valid station address. */
- if (!fe_valid_Ether_p(sc->sc_enaddr, 0))
- return ENXIO;
+ if (!fe_valid_Ether_p(sc->sc_enaddr, 0))
+ {
+ printf("Bad ethernet\n");
+ return ENXIO;
+ }
return 0;
}
OpenPOWER on IntegriCloud