Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/dev/pci Pull up revision 1.55 (requested by thorpej...



details:   https://anonhg.NetBSD.org/src/rev/db5e1d4aedd4
branches:  netbsd-1-6
changeset: 529230:db5e1d4aedd4
user:      tron <tron%NetBSD.org@localhost>
date:      Fri Nov 01 18:20:17 2002 +0000

description:
Pull up revision 1.55 (requested by thorpej in ticket #411):
* Give symbolic names to the CFG bits in the EEPROM.
* Get CFG_M64ADDR, CFG_T64ADDR, and CFG_DATA64_EN from the EEPROM.
  Note, we still disable CFG_M64ADDR and CFG_T64ADDR later (XXX need
  PCI bus capability flags for these).
* Print a message if we're in a 64-bit slot and 64-bit data is
  disabled in the EEPROM.  Make sure CFG_DATA64_EN is disabled if
  we're not in a 64-bit slot.

diffstat:

 sys/dev/pci/if_sip.c |  34 +++++++++++++++++++++++-----------
 1 files changed, 23 insertions(+), 11 deletions(-)

diffs (65 lines):

diff -r b4cee7484eb2 -r db5e1d4aedd4 sys/dev/pci/if_sip.c
--- a/sys/dev/pci/if_sip.c      Fri Nov 01 18:17:19 2002 +0000
+++ b/sys/dev/pci/if_sip.c      Fri Nov 01 18:20:17 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_sip.c,v 1.52.4.1 2002/05/28 23:00:39 tv Exp $       */
+/*     $NetBSD: if_sip.c,v 1.52.4.2 2002/11/01 18:20:17 tron Exp $     */
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -82,7 +82,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.52.4.1 2002/05/28 23:00:39 tv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_sip.c,v 1.52.4.2 2002/11/01 18:20:17 tron Exp $");
 
 #include "bpfilter.h"
 
@@ -787,15 +787,21 @@
         * friends -- it affects packet data, not descriptors.
         */
 #ifdef DP83820
+       /*
+        * XXX Need some PCI flags indicating support for
+        * XXX 64-bit addressing.
+        */
+       sc->sc_cfg &= ~(CFG_M64ADDR | CFG_T64ADDR);
+
        reg = bus_space_read_4(sc->sc_st, sc->sc_sh, SIP_CFG);
        if (reg & CFG_PCI64_DET) {
                printf("%s: 64-bit PCI slot detected\n", sc->sc_dev.dv_xname);
-               /*
-                * XXX Need some PCI flags indicating support for
-                * XXX 64-bit addressing (SAC or DAC) and 64-bit
-                * XXX data path.
-                */
-       }
+               if ((sc->sc_cfg & CFG_DATA64_EN) == 0)
+                       printf("%s: 64-bit data transfers disabled in EEPROM\n",
+                           sc->sc_dev.dv_xname);
+       } else
+               sc->sc_cfg &= ~CFG_DATA64_EN;
+
        if (sc->sc_cfg & (CFG_TBI_EN|CFG_EXT_125)) {
                const char *sep = "";
                printf("%s: using ", sc->sc_dev.dv_xname);
@@ -3058,9 +3064,15 @@
        sc->sc_gpior = eeprom_data[0x04];
 
        /* Get various CFG related bits. */
-       if ((eeprom_data[0x05] >> 0) & 1)
-               sc->sc_cfg |= CFG_EXT_125; 
-       if ((eeprom_data[0x05] >> 9) & 1)
+       if (eeprom_data[0x05] & DP83820_CONFIG2_CFG_EXT_125)
+               sc->sc_cfg |= CFG_EXT_125;
+       if (eeprom_data[0x05] & DP83820_CONFIG2_CFG_M64ADDR)
+               sc->sc_cfg |= CFG_M64ADDR;
+       if (eeprom_data[0x05] & DP83820_CONFIG2_CFG_DATA64_EN)
+               sc->sc_cfg |= CFG_DATA64_EN;
+       if (eeprom_data[0x05] & DP83820_CONFIG2_CFG_T64ADDR)
+               sc->sc_cfg |= CFG_T64ADDR;
+       if (eeprom_data[0x05] & DP83820_CONFIG2_CFG_TBI_EN)
                sc->sc_cfg |= CFG_TBI_EN;
 }
 #else /* ! DP83820 */



Home | Main Index | Thread Index | Old Index