Source-Changes-HG archive

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

[src/trunk]: src/sys/dev Move the PCI device number to the base Tulip softc; ...



details:   https://anonhg.NetBSD.org/src/rev/9e0a1b746928
branches:  trunk
changeset: 476368:9e0a1b746928
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Sep 14 23:33:04 1999 +0000

description:
Move the PCI device number to the base Tulip softc; it will be needed to
decode the SROM on 21041 and 2114x multi-port boards.

diffstat:

 sys/dev/ic/tulipvar.h    |   3 ++-
 sys/dev/pci/if_tlp_pci.c |  11 +++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (63 lines):

diff -r b62df938e4ec -r 9e0a1b746928 sys/dev/ic/tulipvar.h
--- a/sys/dev/ic/tulipvar.h     Tue Sep 14 23:23:32 1999 +0000
+++ b/sys/dev/ic/tulipvar.h     Tue Sep 14 23:33:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tulipvar.h,v 1.9 1999/09/14 22:25:50 thorpej Exp $     */
+/*     $NetBSD: tulipvar.h,v 1.10 1999/09/14 23:33:05 thorpej Exp $    */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -233,6 +233,7 @@
        int             sc_flags;       /* misc flags. */
        char            sc_name[16];    /* board name */
        u_int32_t       sc_cacheline;   /* cache line size */
+       int             sc_devno;       /* PCI device # */
 
        struct mii_data sc_mii;         /* MII/media information */
 
diff -r b62df938e4ec -r 9e0a1b746928 sys/dev/pci/if_tlp_pci.c
--- a/sys/dev/pci/if_tlp_pci.c  Tue Sep 14 23:23:32 1999 +0000
+++ b/sys/dev/pci/if_tlp_pci.c  Tue Sep 14 23:33:04 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tlp_pci.c,v 1.8 1999/09/14 22:25:49 thorpej Exp $   */
+/*     $NetBSD: if_tlp_pci.c,v 1.9 1999/09/14 23:33:04 thorpej Exp $   */
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -102,8 +102,6 @@
        pci_chipset_tag_t sc_pc;        /* our PCI chipset */
        pcitag_t sc_pcitag;             /* our PCI tag */
 
-       int     sc_pcidev;              /* PCI device number */
-
        int     sc_flags;               /* flags; see below */
 
        LIST_HEAD(, tulip_pci_softc) sc_intrslaves;
@@ -277,7 +275,8 @@
                        continue;
                if ((cur->sc_flags & shared) == 0)
                        continue;
-               if (best == NULL || best->sc_pcidev > cur->sc_pcidev)
+               if (best == NULL ||
+                   best->sc_tulip.sc_devno > cur->sc_tulip.sc_devno)
                        best = cur;
        }
 
@@ -319,7 +318,7 @@
        u_int8_t enaddr[ETHER_ADDR_LEN];
        u_int32_t val;
 
-       psc->sc_pcidev = pa->pa_device;
+       sc->sc_devno = pa->pa_device;
        psc->sc_pc = pa->pa_pc;
        psc->sc_pcitag = pa->pa_tag;
 
@@ -503,7 +502,7 @@
                 */
                if (psc->sc_flags & TULIP_PCI_SLAVEROM)
                        enaddr[5] +=
-                           psc->sc_pcidev - psc->sc_master->sc_pcidev;
+                           sc->sc_devno - psc->sc_master->sc_tulip.sc_devno;
 
                /*
                 * All 21040 boards start out with the same



Home | Main Index | Thread Index | Old Index