Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Give the ISV filter a chance to verify 21143 pas...



details:   https://anonhg.NetBSD.org/src/rev/f275d8d8607d
branches:  trunk
changeset: 481350:f275d8d8607d
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Wed Jan 26 16:51:11 2000 +0000

description:
Give the ISV filter a chance to verify 21143 pass 4.1 SROMs before running
them through the quirk table.

diffstat:

 sys/dev/pci/if_tlp_pci.c |  50 +++++++++++++++++++++++++----------------------
 1 files changed, 27 insertions(+), 23 deletions(-)

diffs (81 lines):

diff -r 6e55e3730bd6 -r f275d8d8607d sys/dev/pci/if_tlp_pci.c
--- a/sys/dev/pci/if_tlp_pci.c  Wed Jan 26 16:42:02 2000 +0000
+++ b/sys/dev/pci/if_tlp_pci.c  Wed Jan 26 16:51:11 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tlp_pci.c,v 1.31 2000/01/26 15:50:52 thorpej Exp $  */
+/*     $NetBSD: if_tlp_pci.c,v 1.32 2000/01/26 16:51:11 thorpej Exp $  */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -735,28 +735,32 @@
                        goto cant_cope;
                break;
 
+       case TULIP_CHIP_21142:
        case TULIP_CHIP_21143:
-               /*
-                * Check for SROM quirkiness.
-                */
-               for (i = 0; sc->sc_srom_addrbits != 8; i++) {
-                       switch ((*tlp_pci_21143_srom_quirks_list[i])(psc)) {
-                       case TPSQ_NOMATCH:
-                               continue;
-
-                       case TPSQ_CONTINUE:
-                               break;
-
-                       case TPSQ_READ_AGAIN_AND_CONTINUE:
-                               goto read_srom_again;
-                       }
-                       break;  /* for TPSQ_CONTINUE */
-               }
-               /* FALLTHROUGH */
-
-       case TULIP_CHIP_21142:
                /* Check for new format SROM. */
                if (tlp_isv_srom_enaddr(sc, enaddr) == 0) {
+                       if (sc->sc_chip == TULIP_CHIP_21143) {
+                               tlp_pci_srom_quirk_t q;
+
+                               /*
+                                * Check for SROM quirkiness.
+                                */
+                               for (i = 0; sc->sc_srom_addrbits != 8; i++) {
+                                       q = tlp_pci_21143_srom_quirks_list[i];
+                                       switch ((*q)(psc)) {
+                                       case TPSQ_NOMATCH:
+                                               continue;
+
+                                       case TPSQ_CONTINUE:
+                                               break;
+
+                                       case TPSQ_READ_AGAIN_AND_CONTINUE:
+                                               goto read_srom_again;
+                                       }
+                                       break;  /* for TPSQ_CONTINUE */
+                               }
+                       }
+
                        /*
                         * Not an ISV SROM; try the old DEC Ethernet Address
                         * ROM format.
@@ -1163,7 +1167,7 @@
 
        /*
         * Check for broken Cobalt interface; pass 4.1 Tulip with
-        * only 6-bit SROM.
+        * only 6-bit SROM and Ethernet address in first 6 bytes.
         */
        if (sc->sc_srom[0] == 0x00 &&
            sc->sc_srom[1] == 0x10 &&
@@ -1180,8 +1184,8 @@
        struct tulip_softc *sc = &psc->sc_tulip;
 
        /*
-        * Pass 4.1 21143s have an 8-address-bit SROM.  We need to read
-        * them again.
+        * Pass 4.1 21143s are supposed to have an 8-address-bit SROM.
+        * We need to read them again.
         */
        if (sc->sc_rev >= 0x41) {
                sc->sc_srom_addrbits = 8;



Home | Main Index | Thread Index | Old Index