mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Paul Gortmaker <paul.gortmaker@windriver.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	qemu-devel@nongnu.org, Arnd Bergmann <arnd.bergmann@linaro.org>
Subject: Re: [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+
Date: Mon, 12 Aug 2013 20:40:54 -0700	[thread overview]
Message-ID: <20130813034054.GA18218@roeck-us.net> (raw)
In-Reply-To: <CAFEAcA94ygwRPSsfxs3DvOcTZbdafLiEHys94FG4aXUx+A1t=A@mail.gmail.com>

On Mon, Aug 12, 2013 at 05:24:50PM +0100, Peter Maydell wrote:

[ ... ]

> If somebody would like to fix the kernel I am happy to
> locate the PCI backplane and test everything (again).
> I would suggest that producing some patches which work
> with QEMU 1.5 or later would be a good start; then we
> can test on h/w as confirmation before they are applied.
> 
Ok, putting a stake in the ground.

Patch tested and working with qemu 1.5.2, using the configuration file
from the yocto project. Patch applied on top of kernel version 3.11-rc5.

Guenter

---

>From 1e07521e935267f2d63ed3635fb93c7e325e0936 Mon Sep 17 00:00:00 2001
From: Guenter Roeck <linux@roeck-us.net>
Date: Mon, 12 Aug 2013 16:20:18 -0700
Subject: [PATCH] arm: Fix map_irq function for ARM versatile hardware

Booting the ARM versatile in qemu fails with the SCSI controller
timing 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
 ------------

Bisecting gives commit 1bc39ac5dab265b76ce6e20d6c85f900539fd190
("ARM: PCI: versatile: fix PCI interrupt setup") -- specifically
the change to use common swizzle instead of NULL.

Further analysis shows that interrupt mapping is wrong for the versatile
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 Peter Maydell for tracking down board information.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 arch/arm/mach-versatile/pci.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c
index e92e5e0..f435267 100644
--- a/arch/arm/mach-versatile/pci.c
+++ b/arch/arm/mach-versatile/pci.c
@@ -327,13 +327,13 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
 {
 	int irq;
 
-	/* slot,  pin,	irq
-	 *  24     1     IRQ_SIC_PCI0
-	 *  25     1     IRQ_SIC_PCI1
-	 *  26     1     IRQ_SIC_PCI2
-	 *  27     1     IRQ_SIC_PCI3
+	/*
+	 * Slot	INTA	INTB	INTC	INTD
+	 * 31	PCI1	PCI2	PCI3	PCI0
+	 * 30	PCI0	PCI1	PCI2	PCI3
+	 * 29	PCI3	PCI0	PCI1	PCI2
 	 */
-	irq = IRQ_SIC_PCI0 + ((slot - 24 + pin - 1) & 3);
+	irq = IRQ_SIC_PCI0 + ((slot + 2 + pin - 1) & 3);
 
 	return irq;
 }
-- 
1.7.9.7


  parent reply	other threads:[~2013-08-13  3:40 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-11 15:54 Guenter Roeck
2013-08-11 22:04 ` Russell King - ARM Linux
2013-08-12  0:40   ` Guenter Roeck
2013-08-12 16:24     ` [Qemu-devel] " Peter Maydell
2013-08-12 16:45       ` Russell King - ARM Linux
2013-08-12 17:33         ` Peter Maydell
2013-08-12 20:06           ` Russell King - ARM Linux
2013-08-12 20:49             ` Peter Maydell
2013-08-12 21:21               ` Russell King - ARM Linux
2013-08-12 21:36                 ` Peter Maydell
2013-08-12 22:12                   ` Russell King - ARM Linux
2013-08-12 22:48                     ` Guenter Roeck
2013-08-12 23:04                     ` Guenter Roeck
2013-08-14 10:33                       ` Russell King - ARM Linux
2013-08-14 12:44                         ` Peter Maydell
2013-08-14 12:49                           ` Russell King - ARM Linux
2013-08-14 12:56                             ` Peter Maydell
2013-08-14 14:41                           ` Guenter Roeck
2013-08-12 17:48         ` Peter Maydell
2013-08-13  8:37         ` Rob Landley
2013-08-13  9:12           ` Peter Maydell
2013-08-13 11:30           ` Russell King - ARM Linux
2013-08-13  3:40       ` Guenter Roeck [this message]
2013-08-15 16:45         ` Peter Maydell
2013-08-15 17:54           ` Guenter Roeck
2013-08-15 18:05             ` Peter Maydell
2013-08-15 18:39               ` Guenter Roeck
2013-08-15 20:50               ` Guenter Roeck
2013-08-15 21:49                 ` Peter Maydell
2013-08-15 22:18                   ` Guenter Roeck
2013-08-15 22:23                     ` Peter Maydell
2013-08-15 23:25                       ` Guenter Roeck
2013-08-19 15:26                       ` Guenter Roeck
2013-08-12 19:02     ` Paul Gortmaker
2013-08-12 20:58       ` Peter Maydell

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=20130813034054.GA18218@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=arnd.bergmann@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=paul.gortmaker@windriver.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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

Powered by JetHome