From owner-acpi-jp@jp.FreeBSD.org Wed Sep 11 05:20:54 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g8AKKsq46841;
	Wed, 11 Sep 2002 05:20:54 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from tasogare.imasy.or.jp (root@tasogare.imasy.or.jp [202.227.24.5])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g8AKKr346836
	for <acpi-jp@jp.FreeBSD.org>; Wed, 11 Sep 2002 05:20:53 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Received: from localhost (iwa@tasogare.imasy.or.jp [202.227.24.5])
	by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id g8AKKlY79951;
	Wed, 11 Sep 2002 05:20:47 +0900 (JST)
	(envelope-from iwasaki@jp.FreeBSD.org)
Message-Id: <20020911.052040.41625914.iwasaki@jp.FreeBSD.org>
To: acpi-jp@jp.FreeBSD.org, jhb@freebsd.org
Cc: imp@bsdimp.com
From: Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
In-Reply-To: <XFMail.20020910150607.jhb@FreeBSD.org>
References: <20020911.035217.41626778.iwasaki@jp.FreeBSD.org>
	<XFMail.20020910150607.jhb@FreeBSD.org>
X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.0 (HANANOEN)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Reply-To: acpi-jp@jp.FreeBSD.org
Precedence: list
Date: Wed, 11 Sep 2002 05:20:40 +0900
X-Sequence: acpi-jp 1812
Subject: [acpi-jp 1812] Re: acpi issue on my Fiva 205
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: iwasaki@jp.FreeBSD.org
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020902

> > I've recalled pci_cfgregwrite() for this purpose and modified
> > acpi_pci_link_set_irq() a bit.  After AcpiSetCurrentResources(),
> > write irq to PCI config space.
> 
> We shouldn't need this.  When we read the intline, we read it via ivars
> using pci_get_irq().  When we route an interrupt for the card bus controller,
> we do this:
> 
>                         cfg->intline = PCIB_ROUTE_INTERRUPT(
>                                 device_get_parent(dev), child, cfg->intpin);
>                         if (PCI_INTERRUPT_VALID(cfg->intline)) {
>                                 pci_write_config(child, PCIR_INTLINE,
>                                     cfg->intline, 1);
>                                 resource_list_add(rl, SYS_RES_IRQ, 0,
>                                     cfg->intline, cfg->intline, 1);
>                         }

I think this code is only for cfg->intline == 255 case, right?
IRQs set by BIOS are 5 and 4, so interrupt routing never be called on
this machine's card bus controller.
This makes things complicated...

dmesg output w/ boot -v:
found-> vendor=0x104c, dev=0xac51, revid=0x00
        bus=0, slot=10, func=0
        class=06-07-00, hdrtype=0x02, mfdev=1
        intpin=a, irq=5
        powerspec 1  supports D0 D1 D2 D3  current D0
found-> vendor=0x104c, dev=0xac51, revid=0x00
        bus=0, slot=10, func=1
        class=06-07-00, hdrtype=0x02, mfdev=1
        intpin=b, irq=4
        powerspec 1  supports D0 D1 D2 D3  current D0
        map[10]: type 1, range 32, base fc006000, size 11, enabled
        map[14]: type 1, range 32, base fc000000, size 14, enabled

Thanks
# I have to sleep...
