* CHRP PCI fixup for Pegasos IDE (looking for testers) @ 2007-07-09 14:54 Matt Sealey 2007-07-09 15:00 ` Matt Sealey 2007-07-09 15:06 ` Alan Cox 0 siblings, 2 replies; 6+ messages in thread From: Matt Sealey @ 2007-07-09 14:54 UTC (permalink / raw) To: linux-ide Hi guys, Just a heads up here, I hammered out this little bit of code over the weekend which "solves" the Pegasos IDE problem by making PCI native mode work like PCI native mode should (it tweaks the ISA bridge to steer both IDE IRQs to 14) http://www.powerdeveloper.org/files/Pegasos/ide_fixup.c I definitely need someone to test it though. I can't compile it and I can't run it on a Pegasos here, and I am not sure if the fix is being done early enough (Alan said "before pci_setup_device"..). It would be nice to see if this interacts with Tejun's patches just recently sent. -- Matt Sealey <matt@genesi-usa.com> Genesi, Manager, Developer Relations ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: CHRP PCI fixup for Pegasos IDE (looking for testers) 2007-07-09 14:54 CHRP PCI fixup for Pegasos IDE (looking for testers) Matt Sealey @ 2007-07-09 15:00 ` Matt Sealey 2007-07-09 15:06 ` Alan Cox 1 sibling, 0 replies; 6+ messages in thread From: Matt Sealey @ 2007-07-09 15:00 UTC (permalink / raw) To: linux-ide I should note it goes at the end of arch/powerpc/platforms/chrp/pci.c under the Winbond native fix :) -- Matt Sealey <matt@genesi-usa.com> Genesi, Manager, Developer Relations Matt Sealey wrote: > Hi guys, > > Just a heads up here, I hammered out this little bit of code over the > weekend which "solves" the Pegasos IDE problem by making PCI native > mode work like PCI native mode should (it tweaks the ISA bridge to > steer both IDE IRQs to 14) > > http://www.powerdeveloper.org/files/Pegasos/ide_fixup.c > > I definitely need someone to test it though. I can't compile it and > I can't run it on a Pegasos here, and I am not sure if the fix is > being done early enough (Alan said "before pci_setup_device"..). > > It would be nice to see if this interacts with Tejun's patches just > recently sent. > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: CHRP PCI fixup for Pegasos IDE (looking for testers) 2007-07-09 14:54 CHRP PCI fixup for Pegasos IDE (looking for testers) Matt Sealey 2007-07-09 15:00 ` Matt Sealey @ 2007-07-09 15:06 ` Alan Cox 2007-07-09 16:05 ` Matt Sealey 1 sibling, 1 reply; 6+ messages in thread From: Alan Cox @ 2007-07-09 15:06 UTC (permalink / raw) To: Matt Sealey; +Cc: linux-ide On Mon, 09 Jul 2007 15:54:31 +0100 Matt Sealey <matt@genesi-usa.com> wrote: > Hi guys, > > Just a heads up here, I hammered out this little bit of code over the > weekend which "solves" the Pegasos IDE problem by making PCI native > mode work like PCI native mode should (it tweaks the ISA bridge to > steer both IDE IRQs to 14) > > http://www.powerdeveloper.org/files/Pegasos/ide_fixup.c > > I definitely need someone to test it though. I can't compile it and > I can't run it on a Pegasos here, and I am not sure if the fix is > being done early enough (Alan said "before pci_setup_device"..). Close but no cookie. The fixup is done at a sensible point, the fixup makes sense. The ifdef is wrong (could be modular PATA_VIA) The viaide->irq check is iffy as this is the PCI IRQ rather than the legacy one. Probably you should just force it to 14 if you know that is the correct behaviour. Otherwise looks a good basis. If it works sanely then I'd bump the other fix out of the old IDE driver and use the quirk fixup for both. Alan ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: CHRP PCI fixup for Pegasos IDE (looking for testers) 2007-07-09 15:06 ` Alan Cox @ 2007-07-09 16:05 ` Matt Sealey 2007-07-09 16:43 ` Alan Cox 0 siblings, 1 reply; 6+ messages in thread From: Matt Sealey @ 2007-07-09 16:05 UTC (permalink / raw) To: Alan Cox; +Cc: linux-ide Well, not looking for a cookie. I don't understand what you mean by the ifdef being wrong. I don't see how else I can make any kind of check for it. If the fix needs to be that early, it can't be done in libata or pata_via directly as it stands. The viaide->irq check is just me being careful. I know for a fact the only way the Pegasos is set up on every firmware revision is that the PCI interrupt line for the IDE controller is set to 14. If it's not set to that, the fixup would have to be more complicated than zeroing out 4 bits, but the chances of it happening are 0. It's basically to protect the system from having IRQ steering set to 14, when the PCI interrupt line could be set to 10, or 11 or 15. Obviously as the fix matures that'll all get fixed, but I haven't even tried it yet, so I am not going to overcomplicate it. As for it being the PCI IRQ instead of legacy, I don't see how it matters. What we want is the IDE steering to match the PCI interrupt line register so native mode works. That's the whole problem as I see it - we configure the controller in PCI native mode, but ISA IDE IRQ steering is still set to 14,15. The quirk fixup won't work for both, the whole REASON the firmware sets the chip up this way is that the old Via driver and the old PCI block layer somewhere, somehow freaks out if the primary and secondary channel are set to the same IRQ. It just cannot deal with it. At least, this was the case for the last check we did on it, in a couple of years, it may have started working. I want to know if it fixes libata first. Making the old block driver is something we can do when we find out if libata works. -- Matt Sealey <matt@genesi-usa.com> Genesi, Manager, Developer Relations Alan Cox wrote: > On Mon, 09 Jul 2007 15:54:31 +0100 > Matt Sealey <matt@genesi-usa.com> wrote: > >> Hi guys, >> >> Just a heads up here, I hammered out this little bit of code over the >> weekend which "solves" the Pegasos IDE problem by making PCI native >> mode work like PCI native mode should (it tweaks the ISA bridge to >> steer both IDE IRQs to 14) >> >> http://www.powerdeveloper.org/files/Pegasos/ide_fixup.c >> >> I definitely need someone to test it though. I can't compile it and >> I can't run it on a Pegasos here, and I am not sure if the fix is >> being done early enough (Alan said "before pci_setup_device"..). > > Close but no cookie. The fixup is done at a sensible point, the fixup > makes sense. > > The ifdef is wrong (could be modular PATA_VIA) > The viaide->irq check is iffy as this is the PCI IRQ rather than the > legacy one. Probably you should just force it to 14 if you know that is > the correct behaviour. > > Otherwise looks a good basis. If it works sanely then I'd bump the other > fix out of the old IDE driver and use the quirk fixup for both. > > Alan ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: CHRP PCI fixup for Pegasos IDE (looking for testers) 2007-07-09 16:05 ` Matt Sealey @ 2007-07-09 16:43 ` Alan Cox 2007-07-09 16:45 ` Matt Sealey 0 siblings, 1 reply; 6+ messages in thread From: Alan Cox @ 2007-07-09 16:43 UTC (permalink / raw) To: Matt Sealey; +Cc: linux-ide > I don't understand what you mean by the ifdef being wrong. I don't > see how else I can make any kind of check for it. If the fix needs if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE) > The viaide->irq check is just me being careful. I know for a fact the > only way the Pegasos is set up on every firmware revision is that > the PCI interrupt line for the IDE controller is set to 14. If it's Cool. Thats fine then. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: CHRP PCI fixup for Pegasos IDE (looking for testers) 2007-07-09 16:43 ` Alan Cox @ 2007-07-09 16:45 ` Matt Sealey 0 siblings, 0 replies; 6+ messages in thread From: Matt Sealey @ 2007-07-09 16:45 UTC (permalink / raw) To: Alan Cox; +Cc: linux-ide Fixed the define thing. As a corollary to the patch it might be a good idea to fix the arch/powerpc/kernel/prom_init.c at line ~2084 and remove the interrupt 15 reference prop[0] = 14; prop[1] = 0x0; - prop[0] = 15; - prop[1] = 0x0; - prom_setprop(ph, name, "interrupts", prop, 4*sizeof(u32)); + prom_setprop(ph, name, "interrupts", prop, 2*sizeof(u32)); } } Since nobody uses the device tree for anything here, I think it's merely cosmetic, though. I'll see what I can do about getting this fix into the firmware as and if the via86cxxx driver works with it (I have my doubts but am willing to be pleasantly surprised) -- Matt Sealey <matt@genesi-usa.com> Genesi, Manager, Developer Relations Alan Cox wrote: >> I don't understand what you mean by the ifdef being wrong. I don't >> see how else I can make any kind of check for it. If the fix needs > > if defined(CONFIG_FOO) || defined(CONFIG_FOO_MODULE) > >> The viaide->irq check is just me being careful. I know for a fact the >> only way the Pegasos is set up on every firmware revision is that >> the PCI interrupt line for the IDE controller is set to 14. If it's > > Cool. Thats fine then. ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-07-09 16:44 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-07-09 14:54 CHRP PCI fixup for Pegasos IDE (looking for testers) Matt Sealey 2007-07-09 15:00 ` Matt Sealey 2007-07-09 15:06 ` Alan Cox 2007-07-09 16:05 ` Matt Sealey 2007-07-09 16:43 ` Alan Cox 2007-07-09 16:45 ` Matt Sealey
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).