Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755982Ab3HLXEM (ORCPT ); Mon, 12 Aug 2013 19:04:12 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:48981 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755614Ab3HLXEK (ORCPT ); Mon, 12 Aug 2013 19:04:10 -0400 Date: Mon, 12 Aug 2013 16:04:08 -0700 From: Guenter Roeck To: Russell King - ARM Linux Cc: Peter Maydell , Paul Gortmaker , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , qemu-devel@nongnu.org, Arnd Bergmann Subject: Re: [Qemu-devel] SCSI bus failures with qemu-arm in kernel 3.8+ Message-ID: <20130812230408.GA4420@roeck-us.net> References: <20130811220450.GY23006@n2100.arm.linux.org.uk> <52082EF8.10005@roeck-us.net> <20130812164548.GE23006@n2100.arm.linux.org.uk> <20130812200628.GG23006@n2100.arm.linux.org.uk> <20130812212149.GH23006@n2100.arm.linux.org.uk> <20130812221250.GI23006@n2100.arm.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130812221250.GI23006@n2100.arm.linux.org.uk> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2226 Lines: 59 On Mon, Aug 12, 2013 at 11:12:50PM +0100, Russell King - ARM Linux wrote: > On Mon, Aug 12, 2013 at 10:36:17PM +0100, Peter Maydell wrote: > > On this point, yes. Equivalent bit from the PB926 TRM: > > http://infocenter.arm.com/help/topic/com.arm.doc.dui0224i/Cacdijji.html > > > > (There are differences between the PCI controllers on > > the different boards. Differences I know of are: > > * size of the three memory mapped regions > > * whether the top bits of the PCI address come from the top > > or bottom of the IMAP* registers > > I believe (based on some experimentation and an educated guess) > > that these both changed at the same point, but some of the board > > TRMs claim to be part one way part the other, presumably due to > > copy and paste error. In particular PB1176's TRM has a mangled > > description of the IMAP* registers which didn't match what the > > h/w actually did in my testing.) > > Bah, updated TRMs since my version. > > Right, so if I've traced everything correctly, this should work: > > /* > * Slot INTA INTB INTC INTD > * 31 PCI1 PCI2 PCI3 PCI0 > * 30 PCI0 PCI1 PCI2 PCI3 > * 29 PCI3 PCI0 PCI1 PCI2 > */ > return IRQ_SIC_PCI0 + ((slot + 2 + pin - 1) & 3); > I tried the above with qemu 1.5.2. Success! Hacked diff is below. Can I write that up as clean patch and submit it, or do we need a test on real hardware ? Thanks, Guenter --- diff --git a/arch/arm/mach-versatile/pci.c b/arch/arm/mach-versatile/pci.c index e92e5e0..53b4208 100644 --- a/arch/arm/mach-versatile/pci.c +++ b/arch/arm/mach-versatile/pci.c @@ -333,7 +333,11 @@ static int __init versatile_map_irq(const struct pci_dev *dev, u8 slot, u8 pin) * 26 1 IRQ_SIC_PCI2 * 27 1 IRQ_SIC_PCI3 */ +#if 0 irq = IRQ_SIC_PCI0 + ((slot - 24 + pin - 1) & 3); +#else + irq = IRQ_SIC_PCI0 + ((slot + 2 + pin - 1) & 3); +#endif return irq; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/