From patchwork Tue May 16 00:17:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Daney X-Patchwork-Id: 9728223 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E3B6860387 for ; Tue, 16 May 2017 00:18:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9F82289D8 for ; Tue, 16 May 2017 00:18:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C6773289DA; Tue, 16 May 2017 00:18:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66E18289DA for ; Tue, 16 May 2017 00:18:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753439AbdEPARy (ORCPT ); Mon, 15 May 2017 20:17:54 -0400 Received: from mail-dm3nam03on0082.outbound.protection.outlook.com ([104.47.41.82]:49888 "EHLO NAM03-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753336AbdEPARv (ORCPT ); Mon, 15 May 2017 20:17:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=70cUaaQccaIODlwFTp7clwG9wsMBm9/cI6jbEgMHSLQ=; b=hWGkCyaqp10IU9AkRF3BQFvqLpm2+C9hqcGcp3ElQA3J5xzJyR8ZSHoG28G6IYPAAXgfzoHI/1x+kWtd4IA/QugAp00Njgy2sqfaicN86k5ek5qiLqbcNIBaa6DL72JlXAteBBLLaDPMs6tOZJ8UMktxWWEItUicbtv1ajRmDac= Authentication-Results: google.com; dkim=none (message not signed) header.d=none; google.com; dmarc=none action=none header.from=cavium.com; Received: from ddl.caveonetworks.com (50.233.148.156) by MWHPR07MB3501.namprd07.prod.outlook.com (10.164.192.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1084.16; Tue, 16 May 2017 00:17:46 +0000 From: David Daney To: Bjorn Helgaas , linux-pci@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Jon Masters , Robert Richter , David Daney Subject: [PATCH 2/2] PCI: Avoid bus reset for Cavium cn8xxx root ports. Date: Mon, 15 May 2017 17:17:36 -0700 Message-Id: <20170516001736.4001-3-david.daney@cavium.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170516001736.4001-1-david.daney@cavium.com> References: <20170516001736.4001-1-david.daney@cavium.com> MIME-Version: 1.0 X-Originating-IP: [50.233.148.156] X-ClientProxiedBy: SN1PR0701CA0062.namprd07.prod.outlook.com (10.163.126.30) To MWHPR07MB3501.namprd07.prod.outlook.com (10.164.192.28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 03481ab0-f444-4fd1-eb58-08d49bf0fb26 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131423075)(201703031133081); SRVR:MWHPR07MB3501; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3501; 3:bqXFofJH1jNbH9xqcDga/gSq0krR+bRbTIoLsw8aWfSPPrkOohQabl+XnHOgox9hU4IIZTC8fPBUhwMKHsdAokkFYRW++J0Suj7IuaWSfDj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AGdJwGZkkqAUp/u1QCdgeqSQW4tXKkAjveJKJX9ZekeJCgFfbZb448Fva/XnLzJXamHMdyBo0H9DfgC6+fuMsV/lRKaz+Fo4IVdqvn4nhS6hTNb12qUoQ0S1vHGHyUi7gJgMn30SJHEubf4ioKlX3AwJhJwadpVwDS7lPtIrnVxc6JB3sN3y5dXGpqE1Xo8gU/Y3zcjCPLHd9Hk5ayAOzeWr6toUvFgMh/P5yUQiNDM6jhMZDThevRhZ0MEMrQld4rv6iRq6tIXjxNUa5rX4X8b3HTFaEmuf+3aOGNVsZIHFQSEQpZ3FA49DIeWbka5py6cBBHzG88/8VEzRqCFcApttg6lXgjIokfB2zCm0u2s2t+DF24bgVwgvey7OTvenMjST2GC/voyG5hIHisZ4wUvN/pJxUe9EC0MMM9Zx488SBPkoxB X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(93001095)(6041248)(20161123558100)(20161123560025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(6072148); SRVR:MWHPR07MB3501; BCL:0; PCL:0; RULEID:; SRVR:MWHPR07MB3501; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3501; 4:+y1RWHJo4fBbpu5DekUGOKJ9q0Lafo59HSVISXY4/OQoWQ1o1Y+muSc0C+r6lk53ACh/0mxofVLu3jF5/YrQ2XwQLTUPVEAkIMNOGxRr4/6yi2C/z2Efd1d5qEMVaX7DkXh8dzx6cXKme+YYWsIYvwuTGWfgIm9QmGhWX30iEgXuy9KF9qZSwonfLWEo1GeZMHpriXuBCPgNPodA5dzjfXNakzaFtWeGDDIUNeP9h+FNZwJHhZgcWvuTXM2ppTerh6xf4xglIM8/iZSJuj7KbkGF2BijWPYE8qlw+0L0v0/d4fG+6GRriV/x0TyvjjHnrFqzsG7tH0eQuQQo4PXWQfCYkbelFwThUwXc/FVOluXJCUgGFdeLTqg+nQQ5yOe/HwQuuYr7+ES6aJjzfHeqsBzEojfAkMex8mi+AWbqu3Ggh/ju+8E1+g8lEiJNgIckw1pcEp60Cm2eGL8/TBsUQvn8KZLBoneiGF0Pb7dX78cTs6c7h9Xao6gwWJvVuwR3g/EAFHiWNHhKZ+2Lbm0Hp33/qK16o1QHo0xbQjuTgIspzsgs0Y5QvczNmex1XIEZS6cwHWGL2XMgQxT5EwYFYT3JQCpw3nqwWj9XT3ZlugGvs+ro/1881HBbM6cbGJGOzJGIE3jLgDQxUpl4pojhOps7PxEINX+w/gnCv4JVLfs0cDKUszh3YxNE75QoUm2PSlZqzAJLAkwlmwChRu/ubEVfuPF/4t7ZM2T81nWROxkC6QFgmYTIKv8x2UGxbQv6GGArF2+QhoOqNoTcq+FyX0ZZIPMtPzSluO8dH7JBgBw= X-Forefront-PRVS: 03094A4065 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39450400003)(39840400002)(39400400002)(39410400002)(39850400002)(50226002)(81166006)(25786009)(8676002)(5003940100001)(33646002)(76176999)(50986999)(53416004)(189998001)(6486002)(53936002)(2906002)(6512007)(2950100002)(6666003)(42186005)(110136004)(107886003)(38730400002)(5660300001)(305945005)(7736002)(4326008)(86362001)(47776003)(478600001)(66066001)(1076002)(3846002)(6116002)(54906002)(72206003)(36756003)(50466002)(6506006)(32563001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3501; H:ddl.caveonetworks.com; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR07MB3501; 23:Cg26NgH8Xuh2ZVzg8kjHrHiJfjzvlfQiUxvOJsPmL?= =?us-ascii?Q?aZkyS2zaQ/ALfPBg0unkDJMS/kXJJXFZrt3ts0BbtegzYvA93jjzeoxh4RLc?= =?us-ascii?Q?cek4QNplqJp5ZnFKIH3eOjuMf0a2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?us-ascii?Q?hn3MFYQ50BZeKitfbTYd+H5GH9LbS3ADJWiuNYrdeTUpj4t2S+wL09QKtdCH?= =?us-ascii?Q?sXN6AnIJ7grngWQWuSeyJ8i9Sbk5R0eHJCePkG/L32Wp5V7lBUAtz3GeD2zx?= =?us-ascii?Q?Okz9DejYjg=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3501; 6:gD9JpstqxFRf2HD7SzQOKNXHEB73Rr+s8T6/3UdH66C51zkI0RerZyjYGSkmhy7Oke1uCx67UDcOPSeFWp2Smmi4fSD2QLb5CEEiC7lUkaicsx+wIeCo2lJ76jUv62A48ekMqg/kCKghvEq7EHNHfB6kZmRN72f000gvVgKpl3y+vYDtgvoydqwWrOeY7luGGL3yL1fRQyLDvyo7DR8b6BnfjRMrXtvufAKA5Zeo2sxCBbIjVNG8aaCgwRMHE09UA8cOguU1wCXoF996EghTLCzdAD9nS27wch2551Fu+5dUCQB0fjYXr9aZvUxutJzml4bpvf1xTugGXjLyb+GPXuLl5Wo21SNlr/QF/9ISR/4+sJgV7cH/GrXZKqHoz8OF/BWu0bQecocyMru3UoR/mzNQZuQEUye+iJ1CNtSyyaiDmqkYex9us3CxXPJFG0OwgdnmHpgvQe/oSIPBGyByMihzQfqiWOoNixV6hWLO1HdY/TxIayHvSGNizjjASIfoT7AQw7zexLCBrY7HVuGd1w==; 5:23sAODItlYcAhIFjdNdZm/LE7cf71p1e5c9Ixt/bIvrjAMn+r0v6D6RiNgMYJtNKq2I2jvhhxpU+oKWuiws8kqi5wrjWnEkFv969TeQNwxOi+/em0OS1FmJMeeYSgHxePkN9rTKFo0Gl+eGtcQbHrw==; 24:zvTRJIxMlX1mqJSvp7ebmEHsGLqglYbz5tT26nHoP9zvNPbJN4Q8x+Yr51nYLKtZZSayfRlsm8mvGHu+JfyWjm+idz8RKMceuMMkXwXbUM4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3501; 7:LoIHhy7NNPoXZSc8f0T/8EmB/k+PlhKTapc5LMn8pi6Ujp+BnZ0i6O/vfNP7ociRs09JjCcCSxd9hOoEMZoP3JPPDAIca+m3ltzWzhT+a716K4jsNn5X21DOW4KwVz1Ekok1Y7dI2n91LCJF4bkR+x71kdbHMjBfrNZZPnNza9OH7M8AxQTA1be17ljKOwdo5haofcbZyTMRqPZCi8AINKjOVSWeBjmDOdpdcJGzCWbhlUPk4ruh/eQZrL+E1Rtv/tlyfiUerNYb4/c++T+hBoF08MhOHtnQt/od840/0CiGUVf0Ges0VCrtrCzPcwdZg/4AhGqppjocNHqd4pwW+w== X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 May 2017 00:17:46.6255 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3501 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Root ports of cn8xxx do not function after bus reset when used with some e1000e and LSI HBA devices. Add a quirk to prevent bus reset on these root ports. Signed-off-by: David Daney --- drivers/pci/quirks.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index 085fb78..02cd847 100644 --- a/drivers/pci/quirks.c +++ b/drivers/pci/quirks.c @@ -3347,6 +3347,14 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0032, quirk_no_bus_reset); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset); DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0033, quirk_no_bus_reset); +/* + * Root port on some Cavium CN8xxx chips do not successfully complete + * a bus reset when used with certain types child devices. Config + * space access to the child may quit responding. Flag the root port + * as not supporting bus reset. + */ +DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_CAVIUM, 0xa100, quirk_no_bus_reset); + static void quirk_no_pm_reset(struct pci_dev *dev) { /*