Booting Imac G5 : success !
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:
> 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
> 0000000 0000 0000
> # hexdump
> 0000000 0000 000a 0000 0001
> 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)
More information about the Linuxppc64-dev