Subject: Re: PC card adapter PCI board not work
To: None <okazaki@hitachi-to.co.jp>
From: Masanori Kanaoka <kanaoka@ann.hi-ho.ne.jp>
List: tech-kern
Date: 09/07/2002 18:40:44
----Next_Part(Sat_Sep__7_18:40:44_2002_240)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,
       From: Tsukasa Okazaki <okazaki@hitachi-to.co.jp>
    Subject: Re: PC card adapter PCI board not work
      Date : Sat, 07 Sep 2002 10:11:53 +0900
 Message-ID: <20020907101153O.okazaki@hitachi-to.co.jp>

$ I attached the dmesg output with your patch.

$ mainbus0 (root)
$  tbxface-0199 [01] AcpiLoadTables        : ACPI Tables successfully loaded
$ Parsing Methods:...................................................................................................................
$ Table [DSDT] - 421 Objects with 36 Devices 115 Methods 27 Regions
$ ACPI Namespace successfully loaded at root 0xc06f5378
$ acpi0 at mainbus0
$ evxfevnt-0175 [02] AcpiEnable            : Transition to ACPI mode successful
$ acpi0: SCI interrupting at irq 11
$ acpi0: fixed-feature power button present
$ acpi_pci_fixup starts:
$ acpi0: fixing up PCI
$ NumberOfInterrupts 1
$ 	 0
$ acpi_get_intr: return 0

I think 0 is invalid.
How about trying next patch?

Regards
---
 Masanori Kanaoka	kanaoka@ann.hi-ho.ne.jp



----Next_Part(Sat_Sep__7_18:40:44_2002_240)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="acpi.diff"

Index: acpi.c
===================================================================
RCS file: /ftp/cvs/syssrc/sys/dev/acpi/acpi.c,v
retrieving revision 1.15
diff -u -r1.15 acpi.c
--- acpi.c	2002/07/29 03:26:20	1.15
+++ acpi.c	2002/09/07 09:27:47
@@ -909,6 +909,9 @@
 	ACPI_RESOURCE *res;
 	ACPI_RESOURCE_IRQ *irq;
 	uint intr;
+#ifdef ACPI_DEBUG
+	int i;
+#endif /* ACPI_DEBUG */
 
 	intr = -1;
 	rv = acpi_get(handle, &ret, AcpiGetCurrentResources);
@@ -918,12 +921,23 @@
 	     res = ACPI_NEXT_RESOURCE(res)) {
 		if (res->Id == ACPI_RSTYPE_IRQ) {
 			irq = (ACPI_RESOURCE_IRQ *)&res->Data;
+#ifdef ACPI_DEBUG
+			printf("NumberOfInterrupts %d\n\t", 
+			    irq->NumberOfInterrupts);
+			for (i = 0;i < irq->NumberOfInterrupts; i++)
+				printf(" %d", irq->Interrupts[i]);
+			printf("\n");
+#endif /* ACPI_DEBUG */
 			if (irq->NumberOfInterrupts == 1)
 				intr = irq->Interrupts[0];
 			break;
 		}
 	}
 	free(ret.Pointer, M_DEVBUF);
+
+#ifdef ACPI_DEBUG
+	printf("acpi_get_intr: return %d\n", intr);
+#endif /* ACPI_DEBUG */
 	return (intr);
 }
 
@@ -1014,7 +1028,7 @@
 		if (link == NULL)
 			continue;
 		line = acpi_get_intr(link);
-		if (line == -1) {
+		if (line == -1 || line == 0) {
 #ifdef ACPI_DEBUG
 			printf("%s: fixing up link %s\n", sc->sc_dev.dv_xname,
 			    PrtElement->Source);
@@ -1026,7 +1040,7 @@
 				continue;
 			}
 			line = acpi_get_intr(link);
-			if (line == -1) {
+			if (line == -1 || line == 0) {
 				printf("%s: get intr failed %s\n",
 				    sc->sc_dev.dv_xname, PrtElement->Source);
 				continue;

----Next_Part(Sat_Sep__7_18:40:44_2002_240)----