Booting Imac G5 : success !
Benjamin Herrenschmidt
benh at kernel.crashing.org
Fri Nov 12 08:42:41 EST 2004
On Thu, 2004-11-11 at 15:31 +0100, J. Mayer wrote:
> Hi,
>
> I got a hack to fix the SATA problem on Imac G5. I was right thinking we
> were missing IRQs. Here's what I think about it:
> the SATA driver tries to use IRQ 0, which is not the good one. When I
> look into the OF device tree, I can see this:
> # hexdump
> /proc/device-tree/ht\@0\,f2000000/pci\@3/k2-sata-root\@c/k2-sata\@0/interrupts
> 0000000 0000 0000
> 0000004
> # hexdump
> /proc/device-tree/ht\@0\,f2000000/pci\@3/k2-sata-root\@c/interrupts
> 0000000 0000 000a 0000 0001
> 0000008
>
> It seems that the driver uses the first (bad) one so I added a test:
> if (pdev->irq == 0) pdev->irq = 0xA;
> in drivers/scsi/sata_svw.c
> then SATA works properly.
> Of course, this is just a hack, I think the real patch is to be in the
> OF tree parse, not to keep invalid IRQ definitions.
>
> You may know better than me the proper place and way to fix this issue
> (generic OF tree routines, SATA driver ?).
No, the probing code doesn't use what is in k2-sata, but what is in
k2-sata-root, which is the real PCI device. I don't know why it wouldn't
have parsed correctly, I suspect a problem with the PCI<->OF node
matching, you can check what's going on in arch/ppc64/kernel/pci.c
int pci_read_irq_line(struct pci_dev *pci_dev)
Where it reads the IRQ line from OF and puts it in the pci_dev struct.
(Note that SATA used to be on IRQ 0 on previous G5s)
Ben.
More information about the Linuxppc64-dev
mailing list