Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Revert the previous change. It does not match t...



details:   https://anonhg.NetBSD.org/src/rev/1ffd522ff6a4
branches:  trunk
changeset: 483526:1ffd522ff6a4
user:      mycroft <mycroft%NetBSD.org@localhost>
date:      Sun Mar 12 04:25:57 2000 +0000

description:
Revert the previous change.  It does not match the commit message *and* was
incomplete (and probably quite broken).

diffstat:

 sys/dev/pci/pccbb.c |  45 +++++++--------------------------------------
 1 files changed, 7 insertions(+), 38 deletions(-)

diffs (110 lines):

diff -r c79dc61cae8e -r 1ffd522ff6a4 sys/dev/pci/pccbb.c
--- a/sys/dev/pci/pccbb.c       Sun Mar 12 04:21:26 2000 +0000
+++ b/sys/dev/pci/pccbb.c       Sun Mar 12 04:25:57 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pccbb.c,v 1.28 2000/03/10 11:08:49 haya Exp $  */
+/*     $NetBSD: pccbb.c,v 1.29 2000/03/12 04:25:57 mycroft Exp $       */
 
 /*
  * Copyright (c) 1998, 1999 and 2000
@@ -370,7 +370,6 @@
        return ycp->yc_chiptype;
 }
 
-#if notyet
 static void
 pccbb_shutdown(void *arg)
 {
@@ -388,7 +387,6 @@
        pci_conf_write(sc->sc_pc, sc->sc_tag, PCI_COMMAND_STATUS_REG, command);
 
 }
-#endif
 
 void
 pccbbattach(parent, self, aux)
@@ -507,9 +505,7 @@
 
        sc->sc_pcmcia_flags = flags;   /* set PCMCIA facility */
 
-#if notyet
        shutdownhook_establish(pccbb_shutdown, sc);
-#endif
 
 #if __NetBSD_Version__ > 103060000
        config_defer(self, pccbb_pci_callback);
@@ -595,11 +591,6 @@
        bus_space_write_4(base_memt, base_memh, CB_SOCKET_EVENT,
            bus_space_read_4(base_memt, base_memh, CB_SOCKET_EVENT));
 
-
-       /* clear data structure for child device interrupt handlers */
-       sc->sc_pil = NULL;
-       sc->sc_pil_intr_enable = 1;
-
        /* Map and establish the interrupt. */
        if (pci_intr_map(pc, sc->sc_intrtag, sc->sc_intrpin,
            sc->sc_intrline, &ih)) {
@@ -641,6 +632,7 @@
                cba.cba_iot = sc->sc_iot;
                cba.cba_memt = sc->sc_memt;
                cba.cba_dmat = sc->sc_dmat;
+               cba.cba_function = 0;
                cba.cba_bus = (busreg >> 8) & 0x0ff;
                cba.cba_cc = (void *)sc;
                cba.cba_cf = &pccbb_funcs;
@@ -961,16 +953,11 @@
        sockevent = bus_space_read_4(memt, memh, CB_SOCKET_EVENT);
        if (0 == sockevent) {
                /* This intr is not for me: it may be for my child devices. */
-               if (sc->sc_pil_intr_enable) {
-                       return pccbbintr_function(sc);
-               } else {
-                       return 0;
-               }
+               return pccbbintr_function(sc);
+       } else {
+               /* reset bit */
+               bus_space_write_4(memt, memh, CB_SOCKET_EVENT, sockevent);
        }
-
-       /* reset bit */
-       bus_space_write_4(memt, memh, CB_SOCKET_EVENT, sockevent);
-
        sockstate = bus_space_read_4(memt, memh, CB_SOCKET_STAT);
 
        if (sockevent & CB_SOCKET_EVENT_CD) {
@@ -3162,17 +3149,6 @@
 
        DPRINTF(("%s: power: why %d\n", sc->sc_dev.dv_xname, why));
 
-       if (why == PWR_SUSPEND || why == PWR_STANDBY) {
-               DPRINTF(("%s: power: why %d stopping intr\n", sc->sc_dev.dv_xname, why));
-               if (sc->sc_pil_intr_enable) {
-                       (void)pccbbintr_function(sc);
-               }
-               sc->sc_pil_intr_enable = 0;
-
-               /* ToDo: deactivate or suspend child devices */
-               
-       }
-
        if (why == PWR_RESUME) {
                /* CSC Interrupt: Card detect interrupt on */
                reg = bus_space_read_4(base_memt, base_memh, CB_SOCKET_MASK);
@@ -3188,14 +3164,7 @@
                 * XXX: the code can't cope with card swap (remove then insert).
                 * how can we detect such situation?
                 */
-               if (why == PWR_RESUME) {
+               if (why == PWR_RESUME)
                        (void)pccbbintr(sc);
-               }
-
-               sc->sc_pil_intr_enable = 1;
-               DPRINTF(("%s: power: RESUME enabling intr\n", sc->sc_dev.dv_xname));
-
-               /* ToDo: activate or wakeup child devices */
-
        }
 }



Home | Main Index | Thread Index | Old Index