All of lore.kernel.org
 help / color / mirror / Atom feed
From: linux@roeck-us.net (Guenter Roeck)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ARM: PCI: versatile: Fix map_irq function to match hardware
Date: Thu, 22 Aug 2013 11:01:36 -0700	[thread overview]
Message-ID: <20130822180136.GA9624@roeck-us.net> (raw)
In-Reply-To: <1377190070-7305-2-git-send-email-peter.maydell@linaro.org>

On Thu, Aug 22, 2013 at 05:47:48PM +0100, Peter Maydell wrote:
> The PCI controller code for the Versatile board has never had the
> correct IRQ mapping for hardware.  For many years it had an odd
> mapping ("all interrupts are int 27") which aligned with the
> equivalent bug in QEMU.  However as of commit 1bc39ac5dab265
> the mapping changed and no longer matched either hardware or QEMU,
> with the result that any PCI card beyond the first in QEMU would
> not have functioning interrupts; for example a boot with a SCSI
> controller would time out as follows:
> 
>  ------------
>  sym0: <895a> rev 0x0 at pci 0000:00:0d.0 irq 92
>  sym0: SCSI BUS has been reset.
>  scsi0 : sym-2.2.3
>  [...]
>  scsi 0:0:0:0: ABORT operation started
>  scsi 0:0:0:0: ABORT operation timed-out.
>  scsi 0:0:0:0: DEVICE RESET operation started
>  scsi 0:0:0:0: DEVICE RESET operation timed-out.
>  scsi 0:0:0:0: BUS RESET operation started
>  scsi 0:0:0:0: BUS RESET operation timed-out.
>  scsi 0:0:0:0: HOST RESET operation started
>  sym0: SCSI BUS has been reset
>  ------------
> 
> Fix the mapping so that it matches real hardware (checked against the
> schematics for PB926 and backplane, and tested against the hardware).
> This allows PCI cards using interrupts to work on hardware for the
> first time; this change will also work with QEMU 1.5 or later, where
> the equivalent bugs in the modelling of the hardware have been fixed.
> 
> Although QEMU will attempt to autodetect whether the kernel is
> expecting the long-standing "everything is int 27" mapping or the one
> hardware has, for certainty we force it into "definitely behave like
> hardware mode"; this will avoid unexpected surprises later if we
> implement sparse irqs. This is harmless on hardware.
> 
> Thanks to Paul Gortmaker for bisecting the problem and finding an initial
> solution, to Russell King for providing the correct interrupt mapping,
> and to Guenter Roeck for providing an initial version of this patch
> and prodding me into relocating the hardware and retesting everything.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>

Tested-by: Guenter Roeck <linux@roeck-us.net>

Patches applied to 3.11-rc6 and 3.10.9, loaded qemu and verified that
access to SCSI controller is working. qemu version 1.5.2.

Guenter

  reply	other threads:[~2013-08-22 18:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-22 16:47 [PATCH 0/3] ARM: PCI: versatile: fix irqs, I/O Peter Maydell
2013-08-22 16:47 ` [PATCH 1/3] ARM: PCI: versatile: Fix map_irq function to match hardware Peter Maydell
2013-08-22 18:01   ` Guenter Roeck [this message]
2013-08-28 19:09   ` Linus Walleij
2013-08-22 16:47 ` [PATCH 2/3] ARM: PCI: versatile: Fix PCI I/O Peter Maydell
2013-08-28 19:11   ` Linus Walleij
2013-08-22 16:47 ` [PATCH 3/3] ARM: PCI: versatile: Fix SMAP register offsets Peter Maydell
2013-08-28 19:12   ` Linus Walleij
2013-08-28 19:13 ` [PATCH 0/3] ARM: PCI: versatile: fix irqs, I/O Linus Walleij
2013-09-04 21:58   ` Kevin Hilman
2013-09-10  0:33     ` Olof Johansson

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=20130822180136.GA9624@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.