From owner-acpi-jp@jp.FreeBSD.org Wed Sep 11 04:52:48 2002
Received: (from daemon@localhost)
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) id g8AJqmU39831;
	Wed, 11 Sep 2002 04:52:48 +0900 (JST)
	(envelope-from owner-acpi-jp@jp.FreeBSD.org)
Received: from harmony.village.org (warner@rover.bsdimp.com [204.144.255.66])
	by castle.jp.FreeBSD.org (8.11.6+3.4W/8.11.3) with ESMTP/inet id g8AJqg339825;
	Wed, 11 Sep 2002 04:52:42 +0900 (JST)
	(envelope-from imp@bsdimp.com)
Received: from localhost (warner@rover2.village.org [10.0.0.1])
	by harmony.village.org (8.12.3/8.12.3) with ESMTP id g8AJqZ9R020291;
	Tue, 10 Sep 2002 13:52:35 -0600 (MDT)
	(envelope-from imp@bsdimp.com)
Message-Id: <20020910.135227.15267320.imp@bsdimp.com>
To: jhb@freebsd.org
Cc: acpi-jp@jp.FreeBSD.org, iwasaki@jp.FreeBSD.org
From: "M. Warner Losh" <imp@bsdimp.com>
In-Reply-To: <XFMail.20020910144732.jhb@FreeBSD.org>
References: <XFMail.20020910143954.jhb@FreeBSD.org>
	<XFMail.20020910144732.jhb@FreeBSD.org>
X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI)
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: Tue, 10 Sep 2002 13:52:27 -0600
X-Sequence: acpi-jp 1811
Subject: [acpi-jp 1811] Re: acpi issue on my Fiva 205
Errors-To: owner-acpi-jp@jp.FreeBSD.org
Sender: owner-acpi-jp@jp.FreeBSD.org
X-Originator: imp@bsdimp.com
X-Distribute: distribute version 2.1 (Alpha) patchlevel 24e+020902

In message: <XFMail.20020910144732.jhb@FreeBSD.org>
            John Baldwin <jhb@FreeBSD.org> writes:
: Still curious.  Also, according to imp@, the non-ACPI case doesn't work either
: right now, so I'd like to get that fixed first (PCIBIOS case) since it is
: simpler then come back to the ACPI case.  Does anyone know how Linux handles
: these machines?

The problem with the PCIBIOS case (which isn't too interesting on the
FIVA, other than to find bugs in our PCI BIOS code) is that it assumes
that if the interrupt is unique, it is routed.  This is not the case,
so you'd want apply something like the following patch:

Index: pci_cfgreg.c
===================================================================
RCS file: /cache/ncvs/src/sys/i386/pci/pci_cfgreg.c,v
retrieving revision 1.93
diff -u -r1.93 pci_cfgreg.c
--- pci_cfgreg.c	9 Sep 2002 18:24:35 -0000	1.93
+++ pci_cfgreg.c	10 Sep 2002 19:48:19 -0000
@@ -318,10 +318,10 @@
 			return (oldirq);
 		}
 		irq = pci_cfgintr_linked(pe, pin);
-		if (irq == PCI_INVALID_IRQ)
-			irq = pci_cfgintr_unique(pe, pin);
 		if (irq != PCI_INVALID_IRQ)
 			already = 1;
+		if (irq == PCI_INVALID_IRQ)
+			irq = pci_cfgintr_unique(pe, pin);
 		if (irq == PCI_INVALID_IRQ)
 			irq = pci_cfgintr_virgin(pe, pin);
 		if (irq == PCI_INVALID_IRQ)

However, this kinda runs in the face of rev 1.83, which specifically
undid this change.  I'll have to see which of the old bioses fail for
the unique case.

Even so, the interrupt is kinda flakey, but that might have been due
to my test environment...

Warner
