Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753377AbbHRQVt (ORCPT ); Tue, 18 Aug 2015 12:21:49 -0400 Received: from terminus.zytor.com ([198.137.202.10]:38530 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752110AbbHRQVs (ORCPT ); Tue, 18 Aug 2015 12:21:48 -0400 Date: Tue, 18 Aug 2015 09:21:29 -0700 From: tip-bot for Jiang Liu Message-ID: Cc: mingo@kernel.org, hpa@zytor.com, alexdeucher@gmail.com, tglx@linutronix.de, tony.luck@intel.com, holler@ahsoftware.de, mrustad@gmail.com, linux-kernel@vger.kernel.org, jiang.liu@linux.intel.com Reply-To: hpa@zytor.com, mingo@kernel.org, tglx@linutronix.de, alexdeucher@gmail.com, tony.luck@intel.com, mrustad@gmail.com, holler@ahsoftware.de, jiang.liu@linux.intel.com, linux-kernel@vger.kernel.org In-Reply-To: <1439911228-9880-1-git-send-email-jiang.liu@linux.intel.com> References: <1439911228-9880-1-git-send-email-jiang.liu@linux.intel.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/irq: Build correct vector mapping for multiple MSI interrupts Git-Commit-ID: 527f0a91e91cd55ec79fce80451b0ad5d5e6a21a X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2476 Lines: 54 Commit-ID: 527f0a91e91cd55ec79fce80451b0ad5d5e6a21a Gitweb: http://git.kernel.org/tip/527f0a91e91cd55ec79fce80451b0ad5d5e6a21a Author: Jiang Liu AuthorDate: Tue, 18 Aug 2015 23:20:20 +0800 Committer: Thomas Gleixner CommitDate: Tue, 18 Aug 2015 18:18:55 +0200 x86/irq: Build correct vector mapping for multiple MSI interrupts Alex Deucher, Mark Rustad and Alexander Holler reported a regression with the latest v4.2-rc4 kernel, which breaks some SATA controllers. With multi-MSI capable SATA controllers, only the first port works, all other ports time out when executing SATA commands. This happens because the first argument to assign_irq_vector_policy() is always the base linux irq number of the multi MSI interrupt block, so all subsequent vector assignments operate on the base linux irq number, so all MSI irqs are handled as the first irq number. Therefor the other MSI irqs of a device are never set up correctly and never fire. Add the loop iterator to the base irq number so all vectors are assigned correctly. Fixes: b5dc8e6c21e7 "x86/irq: Use hierarchical irqdomain to manage CPU interrupt vectors" Reported-and-tested-by: Alex Deucher Reported-and-tested-by: Mark Rustad Reported-and-tested-by: Alexander Holler Signed-off-by: Jiang Liu Cc: Tony Luck Link: http://lkml.kernel.org/r/1439911228-9880-1-git-send-email-jiang.liu@linux.intel.com Signed-off-by: Thomas Gleixner --- arch/x86/kernel/apic/vector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/vector.c b/arch/x86/kernel/apic/vector.c index f813261..2683f36 100644 --- a/arch/x86/kernel/apic/vector.c +++ b/arch/x86/kernel/apic/vector.c @@ -322,7 +322,7 @@ static int x86_vector_alloc_irqs(struct irq_domain *domain, unsigned int virq, irq_data->chip = &lapic_controller; irq_data->chip_data = data; irq_data->hwirq = virq + i; - err = assign_irq_vector_policy(virq, irq_data->node, data, + err = assign_irq_vector_policy(virq + i, irq_data->node, data, info); if (err) goto error; -- 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/