linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matt Sealey <matt@genesi-usa.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: linux-ide@vger.kernel.org
Subject: Re: CHRP PCI fixup for Pegasos IDE (looking for testers)
Date: Mon, 09 Jul 2007 17:05:16 +0100	[thread overview]
Message-ID: <46925CBC.1020100@genesi-usa.com> (raw)
In-Reply-To: <20070709160656.2666ef61@the-village.bc.nu>

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

  reply	other threads:[~2007-07-09 16:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2007-07-09 16:43     ` Alan Cox
2007-07-09 16:45       ` Matt Sealey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46925CBC.1020100@genesi-usa.com \
    --to=matt@genesi-usa.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-ide@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).