mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: Russell King <rmk@arm.linux.org.uk>
Cc: linux-pcmcia <linux-pcmcia@lists.infradead.org>,
	Daniel Ritz <daniel.ritz@gmx.ch>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2.6] ToPIC specific init for yenta_socket
Date: Wed, 6 Aug 2003 16:39:17 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.56.0308061554480.4178@marabou.research.att.com> (raw)
In-Reply-To: <20030806203217.F16116@flint.arm.linux.org.uk>

On Wed, 6 Aug 2003, Russell King wrote:

> On Wed, Aug 06, 2003 at 03:07:21PM -0400, Pavel Roskin wrote:
> > I read the PCMCIA list, but not LKML, and I have no idea what problems
> > you are talking about.  Could you please explain of give a pointer to
> > a previous post?  I could cross-check the problem against plx9052
> > driver.
>
> It's fairly complex.  Let's just summarize it as "yenta texas
> instruments IRQ routing fucked up" 8)  The chip has a bunch of registers
> to control what signals get routed to which physical pins, and it seems
> that between June 2002 and today, some bad changes happened.  I'm
> currently trying to track down each one, but, as there have been several
> levels of patching going on, it isn't simple.

I thought you mean something more fundamental.  This problem really should
not stand in the way of changes unrelated to the TI bridges, such as the
ToPIC patch.

TI bridges have 3 different interrupt routing methods.  The i82365 manual
from pcmcia-cs lists all three - PCI interrupts, ISA interrupts and ISA
interrupts routed via an external serial interrupt controller.

PCI cards without an additional ISA connector always use PCI interrupts.
PowerPC architecture also requires PCI interrupts.  Laptops may use any of
three routing methods, but some of those methods may not work.

The i82365 driver from pcmcia-cs used the preexisting configuration by
default, which was OK for most laptops, but not for standalone PCI cards.

2.5 kernels introduced a device table to determine the interrupt delivery
method.  I criticized this approach, and wrote a patch that would turn on
ISA interrupts if the PCI interrupt delivery failed.  This patch was
applied by Alan Cox to the 2.4 tree.

Unfortunately, I forgot about bridges using external serial interrupt
controllers (I have no idea what it means).  It was reported that such
bridges were also probed for PCI interrupts, and after failing that,
reconfigured to the normal ISA interrupt delivery, which didn't work
either.

Unfortunately I was to busy to respond and didn't have anything but a PCI
card.  I saw some activity on the 2.4 branch to work around this problem.
My patch was also ported to the 2.5 branch.

The problem with TI bridges is that there are at least 3 types of them
that needs to be tested, and I only have one of them.

If there is a desire to do it right this time, and if the problem is
considered serious to spend some time on it, here's how I would do it.

- Never trust preexisting configuration.  Always probe the interrupts.
- Use PCI ID only to disable access to unsupported registers, not to
  find the best IRQ routing.
- Cache the probe results until yenta_socket is unloaded.  Probe
  interrupts once per socket (i.e. 2 times for two-socket cards).
- Probe PCI interrupts first.
- Probe ISA interrupts next, only if there are free interrupts and the
  architecture allows ISA interrupts.
- Probe serial ISA interrupts under the same conditions.
- If all probes fail, deny interrupt requests from clients.  This would
  allow some memory cards.

I can write this code, but I only have a PCI card to test.

-- 
Regards,
Pavel Roskin

  reply	other threads:[~2003-08-06 20:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-06 18:25 Daniel Ritz
2003-08-06 18:44 ` Russell King
2003-08-06 19:07   ` Pavel Roskin
2003-08-06 19:32     ` Russell King
2003-08-06 20:39       ` Pavel Roskin [this message]
2003-08-06 22:23         ` TI yenta-alikes (was: ToPIC specific init for yenta_socket) Tim Small
2003-08-07  4:01           ` Pavel Roskin
2003-08-07  9:02             ` Russell King
2003-08-07 12:18               ` Alan Cox
2003-08-07 13:02                 ` TI yenta-alikes Tim Small
2003-08-07 13:16                   ` Russell King
2003-08-07 14:00                     ` Alan Cox
2003-08-07 14:38                       ` Russell King
2003-08-07 14:49                     ` Tim Small
2003-08-07 13:12                 ` TI yenta-alikes (was: ToPIC specific init for yenta_socket) Russell King
2003-08-07  9:18             ` TI yenta-alikes Tim Small
2003-08-06 20:50   ` [PATCH 2.6] ToPIC specific init for yenta_socket Daniel Ritz

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=Pine.LNX.4.56.0308061554480.4178@marabou.research.att.com \
    --to=proski@gnu.org \
    --cc=daniel.ritz@gmx.ch \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=rmk@arm.linux.org.uk \
    /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

all inboxes | Powered by JetHome®