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/09/2002 18:58:02
----Next_Part(Mon_Sep__9_18:58:02_2002_054)--
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 : Mon, 09 Sep 2002 09:15:21 +0900 (JST)
Message-ID: <20020909.091521.68536026.okazaki@hitachi-to.co.jp>
$ When applying this patch, all the devices on the PCI bus
$ were assigned to irq 15. The dmesg output are shown below.
If possible,Would you please show dmesg output with attached patch?
Regards
---
Masanori Kanaoka kanaoka@ann.hi-ho.ne.jp
----Next_Part(Mon_Sep__9_18:58:02_2002_054)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline; filename="acpi.diff1"
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/09 09:54:20
@@ -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;
@@ -1054,6 +1068,10 @@
ACPI_RESOURCE_IRQ *irq;
ACPI_STATUS rv;
uint delta;
+#ifdef ACPI_DEBUG
+ ACPI_RESOURCE_IRQ *irqp;
+ int i;
+#endif /* ACPI_DEBUG */
rv = acpi_get(handle, &bufp, AcpiGetPossibleResources);
if (ACPI_FAILURE(rv))
@@ -1080,6 +1098,15 @@
memcpy(&resn->Data, &resp->Data,
sizeof(ACPI_RESOURCE_IRQ));
irq = (ACPI_RESOURCE_IRQ *)&resn->Data;
+#ifdef ACPI_DEBUG
+ printf("Possbile irq\n");
+ irqp = (ACPI_RESOURCE_IRQ *)&resp->Data;
+ printf("NumberOfInterrupts: %d\n\t", irqp->NumberOfInterrupts);
+ for (i = 0; i < irqp->NumberOfInterrupts;i++) {
+ printf("%d ", irqp->Interrupts[i]);
+ }
+ printf("\n");
+#endif /* ACPI_DEBUG */
irq->Interrupts[0] =
((ACPI_RESOURCE_IRQ *)&resp->Data)->
Interrupts[irq->NumberOfInterrupts-1];
----Next_Part(Mon_Sep__9_18:58:02_2002_054)----