Booting Imac G5 : success !
l_indien at magic.fr
Sat Nov 13 02:53:07 EST 2004
On Thu, 2004-11-11 at 22:42, Benjamin Herrenschmidt wrote:
> 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.
> > 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.
OK, you're right. The problem is that in the PCI configuration space of
the SATA root, there's no IRQ line defined. I can see we're in the same
case for the IDE controller, and I saw this code:
np = pci_device_to_OF_node(pdev);
if (np->n_intrs == 0)
pmif->irq = pdev->irq;
pmif->irq = np->intrs.line;
Then I did the same in the sata driver and I got it working. Do you
think this is an acceptable fix ?
J. Mayer <l_indien at magic.fr>
More information about the Linuxppc64-dev