Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Nov 2003 17:36:43 -0500 (EST)
From:      John Baldwin <jhb@FreeBSD.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: small regression in cbb and a confusion with rl driver
Message-ID:  <XFMail.20031107173643.jhb@FreeBSD.org>
In-Reply-To: <20031107.152309.61949498.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

On 07-Nov-2003 M. Warner Losh wrote:
> In message: <XFMail.20031107152126.john@baldwin.cx>
>             John Baldwin <john@baldwin.cx> writes:
>: 
>: On 07-Nov-2003 John Baldwin wrote:
>: > 
>: > On 07-Nov-2003 Sven Petai wrote:
>: >> hi
>: >> 
>: >> I upgraded my laptop (compaq Evo n1020V) from 5.1 beta to recent current few 
>: >> days ago. I noticed two regressions and hunted down commits that introduced 
>: >> them
>: >> 
>: >> the first one is that my keyboard doesn't respond before single user mode if I 
>: >> reboot fBSD, so I can't break into loader.. it works fine when doing cold 
>: >> boot though.
>: >> this bug is introduced by the version 1.86 of the file
>: >> src/sys/dev/pccbb/pccbb.c
>: >> my cbb is recognized as 
>: >> cbb0: <TI4410 PCI-CardBus Bridge> mem 0xffbfe000-0xffbfefff irq 10 at device 
>: >> 10.0 on pci0
>: >> cbb0: Found memory at ffbfe000
>: >> full dmesg is available @ 
>: >> http://bsd.ee/~hadara/dump/dmesg.2003.11.04_evon1020v
>: > 
>: > Hmm, I have this keyboard problem as well but my bridge is:
>: > 
>: > cbb0: <TI1225 PCI-CardBus Bridge> at device 4.0 on pci0
>: > cbb1: <TI1225 PCI-CardBus Bridge> at device 4.1 on pci0
>: > 
>: > I'm going to try disabling the func_intr() functions to see if that makes
>: > my keyboard happier.
>: 
>: Yes. this has helped immensely.  My keyboard now works again after
>: reboot and key repeat now works again.  I just disabled both of
>: the enable and disable func_intr functions.
> 
> I have no clue what you are talking about here...

Index: pccbb.c
===================================================================
RCS file: /usr/cvs/src/sys/dev/pccbb/pccbb.c,v
retrieving revision 1.96
diff -u -r1.96 pccbb.c
--- pccbb.c     24 Oct 2003 07:20:13 -0000      1.96
+++ pccbb.c     7 Nov 2003 18:21:27 -0000
@@ -409,7 +409,7 @@
        return (ENXIO);
 }
 
-
+#if 0
 /*
  * Disable function interrupts by telling the bridge to generate IRQ1
  * interrupts.  These interrupts aren't really generated by the chip, since
@@ -442,6 +442,7 @@
            EXCA_INTR_IRQ_NONE;
        exca_putb(&sc->exca, EXCA_INTR, reg);
 }
+#endif
 
 static void
 cbb_chipinit(struct cbb_softc *sc)
@@ -618,7 +619,9 @@
        exca_putb(&sc->exca, EXCA_INTR, EXCA_INTR_ENABLE);
        exca_putb(&sc->exca, EXCA_CSC_INTR, 0);
 
+#if 0
        cbb_disable_func_intr(sc);
+#endif
 
        /* close all memory and io windows */
        pci_write_config(sc->dev, CBBR_MEMBASE0, 0xffffffff, 4);
@@ -915,7 +918,9 @@
        ih->arg = arg;
        ih->flags = flags & INTR_MPSAFE;
        STAILQ_INSERT_TAIL(&sc->intr_handlers, ih, entries);
+#if 0
        cbb_enable_func_intr(sc);
+#endif
        /*
         * XXX need to turn on ISA interrupts, if we ever support them, but
         * XXX for now that's all we need to do.
@@ -1137,7 +1142,9 @@
                        mtx_lock(&sc->mtx);
                        cbb_setb(sc, CBB_SOCKET_MASK, CBB_SOCKET_MASK_CD);
                        sc->flags &= ~CBB_CARD_OK;
+#if 0
                        cbb_disable_func_intr(sc);
+#endif
                        DPRINTF(("Waking up thread\n"));
                        cv_signal(&sc->cv);
                        mtx_unlock(&sc->mtx);


The keyboard uses IRQ 1.  Disabling using IRQ 1 for the CSC interrupt
fixes several problems I've had recently with my laptop's keyboard (such
as key repeat not working at all, the keyboard typically not working even
in the BIOS after a warm reboot, etc.)

-- 

John Baldwin <jhb@FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.20031107173643.jhb>