Date: Sat, 15 Jan 2000 18:39:05 +0900 From: Tatsumi Hosokawa <hosokawa@itc.keio.ac.jp> To: mobile@FreeBSD.org Subject: Working pcic polling mode patch (Re: Polling mode of pcic as default?) Message-ID: <86ln5rhdxi.wl@ringo.FromTo.Cc> In-Reply-To: In your message of "Sat, 15 Jan 2000 17:42:51 %2B0900" <86oganhgj8.wl@ringo.FromTo.Cc> References: <86oganhgj8.wl@ringo.FromTo.Cc>
next in thread | previous in thread | raw e-mail | index | archive | help
At Sat, 15 Jan 2000 17:42:51 +0900, Tatsumi Hosokawa <hosokawa@itc.keio.ac.jp> wrote: > I think that better default behavior of pcic is polling mode (for > instetion/removal of cards) because, > > 1. IRQ mode does not work on some pc-card controller on -current > and coming 4.0-RELEASE (Toshiba ToPIC, TI-1250, etc.). > > 2. IRQ is very expensive resource. > > 3. Cost of polling mode is little. 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. --- pcic.c Fri Dec 10 16:02:41 1999 +++ /home/hosokawa/pcic.c Sat Jan 15 18:35:37 2000 @@ -263,7 +263,7 @@ char *name; int i; int error; - struct resource *res; + struct resource *res = 0; int rid; static int maybe_vlsi = 0; @@ -454,8 +454,9 @@ if (!getenv_int("machdep.pccard.pcic_irq", &pcic_irq)) pcic_irq = 0; rid = 0; - res = bus_alloc_resource(dev, SYS_RES_IRQ, - &rid, pcic_irq, ~0, 1, RF_ACTIVE); + if (pcic_irq) + 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); @@ -496,6 +497,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); -- --------------------------- Tatsumi Hosokawa hosokawa@itc.keio.ac.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-mobile" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ln5rhdxi.wl>