Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/isa Don't attach an 3bc509B as ep? at isa if the EEP...



details:   https://anonhg.NetBSD.org/src/rev/61438100d1e7
branches:  trunk
changeset: 472097:61438100d1e7
user:      jonathan <jonathan%NetBSD.org@localhost>
date:      Tue Apr 20 22:07:37 1999 +0000

description:
Don't attach an 3bc509B as ep? at isa if the EEPROM is set to to PnP mode.
See PR# port-i386/7428

diffstat:

 sys/dev/isa/if_ep_isa.c |  28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

diffs (56 lines):

diff -r 72bea28d5e82 -r 61438100d1e7 sys/dev/isa/if_ep_isa.c
--- a/sys/dev/isa/if_ep_isa.c   Tue Apr 20 21:43:03 1999 +0000
+++ b/sys/dev/isa/if_ep_isa.c   Tue Apr 20 22:07:37 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ep_isa.c,v 1.24 1998/11/04 00:30:14 fvdl Exp $      */
+/*     $NetBSD: if_ep_isa.c,v 1.25 1999/04/20 22:07:37 jonathan Exp $  */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -256,17 +256,16 @@
                bus_space_write_1(iot, ioh, 0, TAG_ADAPTER + 1);
 
                /*
-                * XXX: this should probably not be done here
-                * because it enables the drq/irq lines from
-                * the board. Perhaps it should be done after
-                * we have checked for irq/drq collisions?
-                */
-               bus_space_write_1(iot, ioh, 0, ACTIVATE_ADAPTER_TO_CONFIG);
-
-               /*
                 * Don't attach a 3c509 in PnP mode.
                 */
                if ((model & 0xfff0) == PROD_ID_3C509) {
+                       int promhigh;
+                       promhigh = htons(epreadeeprom(iot, ioh, EEPROM_CONFIG_HIGH));
+                       if (promhigh & 0x08) {
+                               printf(
+                                "3COM 3C509 Ethernet card in PnP mode\n");
+                               continue;
+                       }
                        if (bus_space_map(iot, iobase, 1, 0, &ioh2)) {
                                printf(
                                "ep_isa_probe: can't map Etherlink iobase\n");
@@ -275,11 +274,20 @@
                        if (bus_space_read_2(iot, ioh2, ELINK_W0_EEPROM_COMMAND)
                            & EEPROM_TST_MODE) {
                                printf(
-                                "3COM 3C509 Ethernet card in PnP mode\n");
+                                "3COM 3C509 Ethernet card in TST/PnP mode\n");
                                continue;
                        }
                        bus_space_unmap(iot, ioh2, 1);
                }
+
+               /*
+                * XXX: this should probably not be done here
+                * because it enables the drq/irq lines from
+                * the board. Perhaps it should be done after
+                * we have checked for irq/drq collisions?
+                */
+               bus_space_write_1(iot, ioh, 0, ACTIVATE_ADAPTER_TO_CONFIG);
+
                epaddcard(bus, iobase, irq, model);
        }
        /* XXX should we sort by ethernet address? */



Home | Main Index | Thread Index | Old Index