From owner-freebsd-current@FreeBSD.ORG Fri Nov 7 14:37:09 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DACD816A4CE for ; Fri, 7 Nov 2003 14:37:09 -0800 (PST) Received: from mail.speakeasy.net (mail5.speakeasy.net [216.254.0.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id F320C43FE5 for ; Fri, 7 Nov 2003 14:37:08 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: (qmail 21216 invoked from network); 7 Nov 2003 22:37:08 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender )encrypted SMTP for ; 7 Nov 2003 22:37:08 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.12.9/8.12.9) with ESMTP id hA7Maice096539; Fri, 7 Nov 2003 17:36:44 -0500 (EST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.4 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20031107.152309.61949498.imp@bsdimp.com> Date: Fri, 07 Nov 2003 17:36:43 -0500 (EST) From: John Baldwin To: "M. Warner Losh" X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: john@baldwin.cx cc: freebsd-current@FreeBSD.org Subject: Re: small regression in cbb and a confusion with rl driver X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Nov 2003 22:37:10 -0000 On 07-Nov-2003 M. Warner Losh wrote: > In message: > John Baldwin 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: 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: at device 4.0 on pci0 >: > cbb1: 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 <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/