linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] powerpc: Fix irq routing on some PowerMac 32
@ 2006-12-13 19:09 Bob Brose
  2006-12-13 22:16 ` Benjamin Herrenschmidt
  2006-12-13 22:32 ` Benjamin Herrenschmidt
  0 siblings, 2 replies; 4+ messages in thread
From: Bob Brose @ 2006-12-13 19:09 UTC (permalink / raw)
  To: linuxppc-dev

I was hoping this might fix the irq mapping problem on the SuperMac 900
detected as 16 (Unknown PowerSurge), no such luck. Though the mapping
changed, the bottom 4 slots on the dec 21052 pci bridge still don't work
with interrupt enabled devices.

As a rehash, there was no problem through 2.6.15 and it's been broken since.

A representative error message (2.6.19 with the fix irq routing patch):

ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver (PCI)
PCI: Enabling device 0000:01:01.0 (0014 -> 0016)
ohci_hcd 0000:01:01.0: OHCI Host Controller
ohci_hcd 0000:01:01.0: new USB bus registered, assigned bus number 1
ohci_hcd 0000:01:01.0: irq 18, io mem 0x80800000
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usb 1-2: new low speed USB device using ohci_hcd and address 2
ohci_hcd 0000:01:01.0: Unlink after no-IRQ?  Controller is probably using the wrong IRQ.

2.6.15
PCI: Enabling device 0000:01:01.0 (0014 -> 0016)
ohci_hcd 0000:01:01.0: OHCI Host Controller
ohci_hcd 0000:01:01.0: new USB bus registered, assigned bus number 1
ohci_hcd 0000:01:01.0: irq 25, io mem 0x80800000
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
usb 1-2: new low speed USB device using ohci_hcd and address 2
input: Logitech M4848 as /class/input/input4
input: USB HID v1.00 Mouse [Logitech M4848] on usb-0000:01:01.0-2


The interrupts in patched 2.6.19:
           CPU0       
 18:          0   PMAC-PIC  Edge      ohci_hcd:usb1
 19:          7   PMAC-PIC  Edge      53C94
 20:         17   PMAC-PIC  Edge      MACE
 21:          0   PMAC-PIC  Edge      MACE-txdma
 22:         36   PMAC-PIC  Edge      MACE-rxdma
 23:       1469   PMAC-PIC  Level     sym53c8xx
 26:          0   PMAC-PIC  Edge      PMac
 27:          0   PMAC-PIC  Edge      PMac Output
 28:          0   PMAC-PIC  Edge      PMac Input
 29:          0   PMAC-PIC  Edge      SWIM3
 31:      23138   PMAC-PIC  Edge      ADB
 32:         14   PMAC-PIC  Edge      MESH
BAD:          0

The interrupts in 2.6.15:
           CPU0       
  2:          0   PMAC-PIC  Edge      MACE-txdma
  3:         43   PMAC-PIC  Edge      MACE-rxdma
  8:          0   PMAC-PIC  Edge      PMac Output
  9:          0   PMAC-PIC  Edge      PMac Input
 12:          7   PMAC-PIC  Edge      53C94
 13:         14   PMAC-PIC  Edge      MESH
 14:         17   PMAC-PIC  Edge      MACE
 17:          0   PMAC-PIC  Edge      PMac
 18:      16293   PMAC-PIC  Edge      ADB
 19:          0   PMAC-PIC  Edge      SWIM3
 23:       1279   PMAC-PIC  Level     sym53c8xx
 25:      51282   PMAC-PIC  Level     ohci_hcd:usb1

(all devices on the 21052 gang on irq 25, these tests are  with only the
ohci adapter in place).

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: Fix irq routing on some PowerMac 32
  2006-12-13 19:09 [PATCH] powerpc: Fix irq routing on some PowerMac 32 Bob Brose
@ 2006-12-13 22:16 ` Benjamin Herrenschmidt
  2006-12-13 22:32 ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-12-13 22:16 UTC (permalink / raw)
  To: Bob Brose; +Cc: linuxppc-dev

On Wed, 2006-12-13 at 19:09 +0000, Bob Brose wrote:
> I was hoping this might fix the irq mapping problem on the SuperMac 900
> detected as 16 (Unknown PowerSurge), no such luck. Though the mapping
> changed, the bottom 4 slots on the dec 21052 pci bridge still don't work
> with interrupt enabled devices.
> 
> As a rehash, there was no problem through 2.6.15 and it's been broken since.
> 
> A representative error message (2.6.19 with the fix irq routing patch):

Hrm... dang, though I had that right now. Let me double check your
device tree.

Looks like one of those cases where OF had it wrong because of the p2p
bridge and the old kernel worked around it with a trick that we must
have lost.

Ben.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: Fix irq routing on some PowerMac 32
  2006-12-13 19:09 [PATCH] powerpc: Fix irq routing on some PowerMac 32 Bob Brose
  2006-12-13 22:16 ` Benjamin Herrenschmidt
@ 2006-12-13 22:32 ` Benjamin Herrenschmidt
  1 sibling, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2006-12-13 22:32 UTC (permalink / raw)
  To: Bob Brose; +Cc: linuxppc-dev

What about that patch ? If it doesn't help, please send me a new dmesg
log of 2.6.19 with patches -and- with #defin'ing DEBUG in
arch/powerpc/kernel/pci_32.c and prom_parse.c.

Index: linux-work/arch/powerpc/kernel/prom_parse.c
===================================================================
--- linux-work.orig/arch/powerpc/kernel/prom_parse.c	2006-12-14 09:27:22.000000000 +1100
+++ linux-work/arch/powerpc/kernel/prom_parse.c	2006-12-14 09:29:36.000000000 +1100
@@ -920,9 +920,20 @@
 
 	/*
 	 * Old machines just have a list of interrupt numbers
-	 * and no interrupt-controller nodes.
+	 * and no interrupt-controller nodes. We also have dodgy
+	 * cases where the APPL,interrupts property is completely
+	 * missing behind pci-pci bridges and we have to get it
+	 * from the parent (the bridge itself, as apple just wired
+	 * everything together on these)
 	 */
-	ints = get_property(device, "AAPL,interrupts", &intlen);
+	while (device) {
+		ints = get_property(device, "AAPL,interrupts", &intlen);
+		if (ints != NULL)
+			break;
+		device = device->parent;
+		if (device && strcmp(device->type, "pci") != 0)
+			break;
+	}
 	if (ints == NULL)
 		return -EINVAL;
 	intlen /= sizeof(u32);

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] powerpc: Fix irq routing on some PowerMac 32
@ 2006-12-14 16:16 Bob Brose
  0 siblings, 0 replies; 4+ messages in thread
From: Bob Brose @ 2006-12-14 16:16 UTC (permalink / raw)
  To: linuxppc-dev

Yes, that did it. The ganged irq is back on 25 now and everything
works. Thanks!

Bob

Ben Said:

> What about that patch ? If it doesn't help, please send me a new dmesg
> log of 2.6.19 with patches -and- with #defin'ing DEBUG in
> arch/powerpc/kernel/pci_32.c and prom_parse.c.
> 
> Index: linux-work/arch/powerpc/kernel/prom_parse.c
> ===================================================================
.
.
.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-12-14 16:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-13 19:09 [PATCH] powerpc: Fix irq routing on some PowerMac 32 Bob Brose
2006-12-13 22:16 ` Benjamin Herrenschmidt
2006-12-13 22:32 ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2006-12-14 16:16 Bob Brose

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).