From patchwork Wed Dec 9 13:07:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ley Foon Tan X-Patchwork-Id: 7808581 Return-Path: X-Original-To: patchwork-ltsi-dev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0243C9F350 for ; Wed, 9 Dec 2015 13:23:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 380A020462 for ; Wed, 9 Dec 2015 13:23:49 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 564A720303 for ; Wed, 9 Dec 2015 13:23:48 +0000 (UTC) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 4743DE6A; Wed, 9 Dec 2015 13:23:48 +0000 (UTC) X-Original-To: ltsi-dev@lists.linuxfoundation.org Delivered-To: ltsi-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 56F52E61 for ; Wed, 9 Dec 2015 13:23:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1bon0055.outbound.protection.outlook.com [157.56.111.55]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 86E9289 for ; Wed, 9 Dec 2015 13:23:46 +0000 (UTC) Received: from BN3PR0301CA0022.namprd03.prod.outlook.com (10.160.180.160) by BY2PR03MB441.namprd03.prod.outlook.com (10.141.141.142) with Microsoft SMTP Server (TLS) id 15.1.331.20; Wed, 9 Dec 2015 13:08:53 +0000 Received: from BY2FFO11FD012.protection.gbl (2a01:111:f400:7c0c::124) by BN3PR0301CA0022.outlook.office365.com (2a01:111:e400:4000::32) with Microsoft SMTP Server (TLS) id 15.1.355.16 via Frontend Transport; Wed, 9 Dec 2015 13:08:53 +0000 Authentication-Results: spf=softfail (sender IP is 66.35.236.227) smtp.mailfrom=altera.com; linuxfoundation.org; dkim=none (message not signed) header.d=none;linuxfoundation.org; dmarc=none action=none header.from=altera.com; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning altera.com discourages use of 66.35.236.227 as permitted sender) Received: from sj-itexedge03.altera.priv.altera.com (66.35.236.227) by BY2FFO11FD012.mail.protection.outlook.com (10.1.14.130) with Microsoft SMTP Server (TLS) id 15.1.337.8 via Frontend Transport; Wed, 9 Dec 2015 13:08:52 +0000 Received: from sj-mail01.altera.com (137.57.1.6) by webmail.altera.com (66.35.236.227) with Microsoft SMTP Server (TLS) id 14.3.174.1; Wed, 9 Dec 2015 05:07:54 -0800 Received: from ubuntu (pg-lftan-440b.altera.priv.altera.com [137.57.93.25]) by sj-mail01.altera.com (8.13.7+Sun/8.13.7) with SMTP id tB9D8mIX028398; Wed, 9 Dec 2015 05:08:49 -0800 (PST) Received: by ubuntu (sSMTP sendmail emulation); Wed, 09 Dec 2015 21:08:41 +0800 From: Ley Foon Tan To: Date: Wed, 9 Dec 2015 21:07:28 +0800 Message-ID: <1449666448-31276-8-git-send-email-lftan@altera.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1449666448-31276-1-git-send-email-lftan@altera.com> References: <1449666448-31276-1-git-send-email-lftan@altera.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD012; 1:LicwGNdsX30kH6RN5hi+a5vmfCkdbORqJc/n0B9MZLN2mpH3JPIZ2ATLUqdYqs/xXG1cIoUyC2rC6k38jVTk1ne5Ejen28HycWzzXr1vbQLKxLPOOb38p9vOhsj5BL+WUUlbjyG8vLT7CMXpVJSC1iBwZ/a3D2W2UeuiQABj7oowQO7UwCwJrw8XU8GADGE1n2h7+qsNjG+PpZm4qvwxZwsFJpDEJqab5JGoITaS7Hga8Ga3RoTYWTdsEDhbzv9yvruBPybb5BD5WjvWqbXwjA7HjI8nHAvnZaLwP4+B54vRO6XJKXH1vHluMg4ryXhci5PMxybT1rsaP7MnbkZmsq/PHksseWVSeKKC3850hwU= X-Forefront-Antispam-Report: CIP:66.35.236.227; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(2980300002)(199003)(189002)(86362001)(4001430100002)(48376002)(105596002)(19580395003)(5008740100001)(50986999)(189998001)(19580405001)(6806005)(42186005)(5003940100001)(50466002)(106466001)(1220700001)(97736004)(1096002)(11100500001)(36756003)(50226001)(92566002)(5001960100002)(110136002)(107886002)(87936001)(2950100001)(76176999)(47776003)(81156007)(586003)(229853001)(2351001)(33646002)(7099028); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR03MB441; H:sj-itexedge03.altera.priv.altera.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB441; 2:LlFyNLOsK4SEVJ5/KdcSaexmGm34Fs7N5MnjxSFkf2hXIWyK9e+r5RGCip/80xe5H+Oh8XGCd4nTs3ulfQ5wJzFw9R6JqtueBDSJzQ0aQ6M7zUkEg5D2xMygJG66HYhR5RhPQqqYHHwnj4wrxtJbTg==; 3:1Zxj2bxjuWwdwv0z33BcT0MoLXH7WcOMjk6fORtflC/KFl/JgZHf/CpUyaP1ZyiJiJ+PJLOsfQBuTH3HdVA4YCyRrhxxd245Eb5IWcIkyNxnAAWr/Apt9PR84bd1HSMtWDa8P8vPuLXSNZNgLNd5dk7bm4UtWeDuza7J1YN/fl1tm+sN7u8yKnzQ9RokjSwOir88NoJlJyQNkrJAJb593UsoFK1CCgVIQDFPJZZXKcs=; 25:8AgpL/l5B6jkm/+xRj3YgIF53o86tczaLzoGtciBetoBrYsg3bMGFLrRvwrFWvVHaNMNlPnDj6jBbkoqX5zGMafYy8+3u/W1A29+KacSQjU1LaHs0Eg2VGfSM5pCG41aSm7L7NEstcJzzGnS/46aU0NwweklYjQ/lUjMx989ZajQUrK66vV4nHfU8E/y0yHihze17GecEH8g7erhBjmoe61YC6TGUpSHZNmUsUjODGI7LaNruDQ9s4g2DMsgYVVHmAm4FHjWhXLlJy3HCpLKXA==; 20:NPsuI7d2jWqvdYkdJCVb0KVt7KO1U33+U5LonVFahOk7KT3bpgZ7lxauYAHECjywAYz6RmnMluhgp/1WkI5nzG5MhA1fLsLhbJ0fdCOgCAtu/LBMGYV3Fd0m8pc/Hdo4aHacz8X8BAWgzDtTMuWbPQ3TgqNkf//dNSiTkl/RCl4= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR03MB441; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(80048183373757); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(8121501046)(520078)(5005006)(3002001)(10201501046); SRVR:BY2PR03MB441; BCL:0; PCL:0; RULEID:; SRVR:BY2PR03MB441; X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB441; 4:ErPApffaiK8s710sALEFAerODO0dFMlfK8FBwBGer7S853mu18kgwLdJmJQpi87V1nbMfurhHEZqQpJdy5301Hn566/QrGkWJ7J5M0sEOYkMEeWna+oq+hn74PUHhX9KGnAGDyu9Bbo+rnObC+LgwN9mH72P52/XRQgLrEWlZooewTbD5KKVcK3KReVP5kYXEhEKSpY6PkQrqXLDmxblv0/BEzqc80yY3EcjEOnyLBFVxHGoosZbVJ9m4muLvP90MWP82920eskmpa4yJ1LiQ0eO7zdenfhVNrXnIFjXupDLno0Rb0g96q08dFSk5BlLsZRM0Rl6b6MR0TIEzRnMmdqtfVsRLqqrwsw7F2ktPKhZMmOCXnwyED/7HEH0vhK+mOE6oz0v6SaaHWaH5vgsM3jsz3F55E0+yo0zHuDwlpPpsiFyAI37pAdVTH8NxhxD X-Forefront-PRVS: 0785459C39 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BY2PR03MB441; 23:guIVA5lqepXjrHVQHBiU7SHzwWtuMKl9bCdeif+x1k?= =?us-ascii?Q?171X4YWjrL+S0fcR9rAStM3LnukbWznF6UVgKkdbZ2oTQYvemiXN/fWLDRz4?= =?us-ascii?Q?VKp3re7iJmyoeDWkwqBb3MVJYbOPCB572MKo9ceq4GqPP8kR/F60wS/385xk?= =?us-ascii?Q?4RekDsFyhcP8NfaBj/I1tudjd2tbedEJqO/9VNo70EqNe10Dfg4hUyqBiCo8?= =?us-ascii?Q?BYs3TRPfPZRfuGrgp9KhLow718H3JVu3NO0vBsKSah3QGRMR7ipZAbFgOITt?= =?us-ascii?Q?PoYavie4D/ivEep24McNAnjjTzvxV2E4g05MT0JJYY8YLpafKsgh8zzqL9TJ?= =?us-ascii?Q?ND1+oWYiPK0F8opATw47s20q/7oIXmldwPTjmJ5Qvu48qSaKo4ffVfLGxg5K?= =?us-ascii?Q?QEiQgRvw5pkfJIhNgEegeirmc5tvDKFud6Luw4TwjZJ+MrFLVVV8WFMRtnLQ?= =?us-ascii?Q?6gwv6m178YIz5ZOB9ARcvvAYFvTxsKGYFMGtUzdoUNjXTVsxLkImQoeCt8om?= =?us-ascii?Q?oChykoQ2CsvTPBeWee+kXdp83cAuXAFmYlPiyx1BFNaR+mizFmilPWJ2faBQ?= =?us-ascii?Q?rCGi83h2gih8f1H14v80x9bhqYls3uMkcC6au0L/VXgI8K0W4Ln8mqMP/S0o?= =?us-ascii?Q?YbSCV6vmXSl08WfpTJ4eHyw/eDpcvMuRKACMPxDbXliBlzV6A2SdFMWuTWMY?= =?us-ascii?Q?GogunT1UQ2q9qD9EQNILeUoyv/1fwsa5TCxkwX7WttNUoW3DZsgfIGJJ06wK?= =?us-ascii?Q?nTB8GIMO42JzcS4qZachKn8T0bizvMydzgkkIeVZvW48XfrOf8s91cVeKWtw?= =?us-ascii?Q?93Ge1jkxS4sijtXlK+w0Ierx7d2QuhrJv4zvoGi8QdLPdPwCzFPApffzBmj1?= =?us-ascii?Q?BQCJ9KomVhiQHaBaQ7D1y/ozq3v7CB4ll3piDItR4HjP02lAGmfOtTExgRgB?= =?us-ascii?Q?wuv1rIMSmc8hNlGzhNqlHM199rnEp6hPa2Oz8GWpgEpW1jmRBKuyPy5SNpeD?= =?us-ascii?Q?8Aqvjgq2ACLgpg9DSQu7AhToDLlAXeJrzPOaePx98FjA=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BY2PR03MB441; 5:e2Obsr3is6rGFFlxuJl+gcAJ0HittBK6UGhrJdSPMrNdPjS6X3j8Bm8N/D6syjgwIhfcTwsgUlX+tKzMEVmapqeE3qx314VZoVebx6CPX2LZfBZCJWcnXdBJQTIPwxKBAW1gTc9T6UV3G3o2fLNy0A==; 24:A3rcUMaxwjf4CXy+sryHNQ1EQPVSlvlYCwfDnWc96rRjbfUmtDrLTyFABXjQbXZD+ehxR5nETGQezxxVQbAVC2eh/SusPPAHTP0G0v4DN3k=; 20:bbT57h/qLCqBxuA5ppGkWl4+weGCMgtOzVjhnnliFOMwBwPeNekp+/hWdjSJJiyQGVgrzungJT4eSZlI2xSnW1fLJoBnmvnAcZdHY2jHBJvfshQO+fXXPxT7mUjOGLNNFofKiZajAwphvilTFTHu6+uiAhLh0qXfyfOlBdoXQA4= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: altera.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2015 13:08:52.7404 (UTC) X-MS-Exchange-CrossTenant-Id: fbd72e03-d4a5-4110-adce-614d51f2077a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=fbd72e03-d4a5-4110-adce-614d51f2077a; Ip=[66.35.236.227]; Helo=[sj-itexedge03.altera.priv.altera.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR03MB441 X-Spam-Status: No, score=-4.2 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org Cc: ltsi-dev@lists.linuxfoundation.org Subject: [LTSI-dev] [PATCH 7/7] PCI: altera: Fix error when INTx is 4 X-BeenThere: ltsi-dev@lists.linuxfoundation.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: "A list to discuss patches, development, and other things related to the LTSI project" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ltsi-dev-bounces@lists.linuxfoundation.org Errors-To: ltsi-dev-bounces@lists.linuxfoundation.org X-Virus-Scanned: ClamAV using ClamSMTP PCI interrupt lines start at 1, not at 0. So, creates additional one interrupt when register for irq domain. Error when PCIe devices have 4 INTx: WARNING: CPU: 1 PID: 1 at kernel/irq/irqdomain.c:280 irq_domain_associate+0x17c/0x1cc() error: hwirq 0x4 is too large for dummy Tested on Ethernet adapter card with multi-functions. Signed-off-by: Ley Foon Tan Signed-off-by: Bjorn Helgaas --- drivers/pci/host/pcie-altera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pcie-altera.c b/drivers/pci/host/pcie-altera.c index 929a808..749954c 100644 --- a/drivers/pci/host/pcie-altera.c +++ b/drivers/pci/host/pcie-altera.c @@ -477,7 +477,7 @@ static int altera_pcie_init_irq_domain(struct altera_pcie *pcie) struct device_node *node = dev->of_node; /* Setup INTx */ - pcie->irq_domain = irq_domain_add_linear(node, INTX_NUM, + pcie->irq_domain = irq_domain_add_linear(node, INTX_NUM + 1, &intx_domain_ops, pcie); if (!pcie->irq_domain) { dev_err(dev, "Failed to get a INTx IRQ domain\n");