From owner-freebsd-mobile Sat Jan 15 3:54:16 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from afs.itc.keio.ac.jp (afs.itc.keio.ac.jp [131.113.212.3]) by hub.freebsd.org (Postfix) with SMTP id 4F8A314F6B for ; Sat, 15 Jan 2000 03:54:12 -0800 (PST) (envelope-from hosokawa@itc.keio.ac.jp) Received: (qmail 13149 invoked from network); 15 Jan 2000 11:54:10 -0000 Received: from ppp163.dialup.st.keio.ac.jp (HELO ringo.FromTo.Cc) (131.113.27.163) by afs.itc.keio.ac.jp with SMTP; 15 Jan 2000 11:54:10 -0000 Date: Sat, 15 Jan 2000 20:55:21 +0900 Message-ID: <86iu0vh7me.wl@ringo.FromTo.Cc> From: Tatsumi Hosokawa To: mobile@FreeBSD.org Subject: Re: Working pcic polling mode patch (Re: Polling mode of pcic as default?) In-Reply-To: In your message of "Sat, 15 Jan 2000 18:39:05 +0900" <86ln5rhdxi.wl@ringo.FromTo.Cc> References: <86oganhgj8.wl@ringo.FromTo.Cc> <86ln5rhdxi.wl@ringo.FromTo.Cc> User-Agent: Wanderlust/2.2.13 (Keep The Faith) SEMI/1.13.7 (Awazu) FLIM/1.13.2 (Kasanui) MULE XEmacs/21.1 (patch 8) (Bryce Canyon) (i386--freebsd) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org At Sat, 15 Jan 2000 18:39:05 +0900, Tatsumi Hosokawa wrote: > I tested polling mode of -current and it does not work. > I wrote a patch to fix this bug. > If there's no objection, I'll commit it as soon as possible > because 4.0 will soon be frozen. Last patch have a minor bug. (if pcic_irq was not defined in loader.rc, polling mode was selected) I fixed this bug. New patch: Index: pcic.c =================================================================== RCS file: /home/ncvs/src/sys/pccard/pcic.c,v retrieving revision 1.85 diff -u -r1.85 pcic.c --- pcic.c 1999/12/10 07:02:41 1.85 +++ pcic.c 2000/01/15 11:49:18 @@ -263,7 +263,7 @@ char *name; int i; int error; - struct resource *res; + struct resource *res = 0; int rid; static int maybe_vlsi = 0; @@ -452,10 +452,14 @@ if (pcic_irq == 0) { /* See if the user has requested a specific IRQ */ if (!getenv_int("machdep.pccard.pcic_irq", &pcic_irq)) - pcic_irq = 0; + pcic_irq = -1; rid = 0; - res = bus_alloc_resource(dev, SYS_RES_IRQ, - &rid, pcic_irq, ~0, 1, RF_ACTIVE); + if (pcic_irq) { + if (pcic_irq < 0) + pcic_irq = 0; + res = bus_alloc_resource(dev, SYS_RES_IRQ, + &rid, pcic_irq, ~0, 1, RF_ACTIVE); + } if (res) { error = bus_setup_intr(dev, res, INTR_TYPE_MISC, pcicintr, NULL, &ih); @@ -465,9 +469,14 @@ return error; } pcic_irq = rman_get_start(res); + printf("pcic: management irq %d\n", pcic_irq); } else { - printf("pcic: polling, can't alloc %d\n", - pcic_irq); + if (pcic_irq) + printf("pcic: polling mode, can't alloc %d\n", + pcic_irq); + else + printf("pcic: polling mode\n"); + pcic_irq = 0; } } /* @@ -496,6 +505,8 @@ */ if (pcic_irq > 0) sp->putb(sp, PCIC_STAT_INT, (pcic_irq << 4) | 0xF); + else if (pcic_irq == 0) + sp->putb(sp, PCIC_STAT_INT, 0xF); } if (validslots && pcic_irq <= 0) pcictimeout_ch = timeout(pcictimeout, 0, hz/2); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message