Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754742AbdIGHt0 (ORCPT ); Thu, 7 Sep 2017 03:49:26 -0400 Received: from mail-sn1nam02on0069.outbound.protection.outlook.com ([104.47.36.69]:54432 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754527AbdIGHtV (ORCPT ); Thu, 7 Sep 2017 03:49:21 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jan.Glauber@cavium.com; Date: Thu, 7 Sep 2017 09:49:04 +0200 From: Jan Glauber To: Alex Williamson Cc: Bjorn Helgaas , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, david.daney@cavium.com, Jon Masters , Robert Richter , linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org Subject: Re: [PATCH v3 3/3] PCI: Avoid slot reset for Cavium cn8xxx root ports Message-ID: <20170907074904.GB13490@hc> References: <20170830142454.10971-1-jglauber@cavium.com> <20170830142454.10971-4-jglauber@cavium.com> <20170830084012.19d91759@w520.home> <20170831094052.GA15906@hc> <20170831100130.5c8a922e@w520.home> <20170907074011.GA13490@hc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170907074011.GA13490@hc> User-Agent: Mutt/1.5.21 (2010-09-15) X-Originating-IP: [46.223.66.108] X-ClientProxiedBy: VI1PR0101CA0064.eurprd01.prod.exchangelabs.com (10.169.128.160) To CY1PR07MB2585.namprd07.prod.outlook.com (10.167.16.135) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c4f00eb1-4fbc-4a80-16e8-08d4f5c4f1c1 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:CY1PR07MB2585; X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2585;3:BbdvoclsnCIbrfcBWUy2rzFvTq/poe8G1y5/aBLSbioGjx5zm3F5Nwtkl9KMfmzJbNv2B4n6qvNb2a/v+EIPWlCNl4OFms5JGAKZSKd15S3DmgOOQH+XQsV+apr0ejCklyx6Rx6SLX1VInViLE85nrLl/ABI/gBRsWAsLRawCMis1c/UqgSU+/st7vKsFR0g9G1sgS2BDUM/Dsf1t2aNAqEDdmXHMbIMsF8wYCYN5S/YYY1nC0wBrlMcgFEGzNdo;25:zBZzQGN1vB9t/RXLEKCwu5G4aTvrVqXqf/BHQNpn7dRVfyLj6H20tm0njQ8usGElsC2XuJrQd+9ziL9M/bsLv1lKmkQZDqh/nhTFTFNRAVGLooucw3I439xO1rmw4zhPd+kSh2BsLOz2rCLmN7JONrjAdTqnMcoIy3aD1Ioa5wkZYl9gQkSpskcJp6ihVXBAujYVTuxgcY4UMw5AKjxEXj3rjfUKR6O6daqu0x+8tue/WC1JQL43OxA/iM94oF0IcarwSw3zUGJp6xN4loJPKlIFWETg1nRrgOVLRXCNKsyys9acULTgMxv18rXnkWzZo6YlhMpOswQRm/EohRG8ig==;31:5O8Lz8BT98KqQzClLzbQdwo59BuUSd9zyxuu7qvSM+WWN9wv6hb4hKr+Duzt/4/n921LCYlbjtW2Y1gPs8KTNHPqyEertp3xhcswDfw4Ld7hBT/faylCCL3HXFd1L95Uy+cgSCs/naQkYRaB4dmv3Ur99LOT6gb89xCGBVWNOu12OMp2Sy1UjS0bygQYy3Llq8v/BP9BRso8o2dNr9bRDAKRwxah1zyjGLuiGBmHMdM= X-MS-TrafficTypeDiagnostic: CY1PR07MB2585: X-Microsoft-Exchange-Diagnostics: 1;CY1PR07MB2585;20:vyWUFzcf+Dx5S7QkpOeRtLfY6oL/QmAGsOfueSIFAQUNCancTe2e/CU5hO6WpkSgWedoYQFM+Za4sS6jlpTS38r7K86+DCeUrNJFqXNtOYj68AtWAsLISe6n8KUCUpd7xnkoi8q5GiAytQ37KBrPcyvJkeBNjQDtI0OWEhX8RvSozDBnACJKStdnqFnWW8f1etMRPtyXyDKLWRu87/B7gBs5cbgX3kcBHFqNZ+l7ULbPkqfmNeYbkMrFVvCPrq7g7ovNgwRN5XoCyW8tHKc0Gbxf6gQBK32Ht6xtONszXJvoaS/oIb17yE+eOaqvokAUu+a45DlUAs5lV8FF2QvlDgN8Df9VTbS3QCpY5fN+iYv+PlUFcMxPFcvtD4hgO9jNMqpaKDI2rQD3dJLXdg1zIQ0s8F3nM+osQyhdHg6Mk9UGhX/Zk40BrPGsM9d2hAAE+CgDHkgMo6a/e1GSmjeuP5l1DwY6MA6USPYOEB+8xRgDYzwI/M+ag1sFow3cxG2HtGHgXrq0O5dyb8sSCbYb3Xb6hVhBY3LvUh9Mgg5vAAdinsbkMQeLFezAOAWZQfFOsHKwyLtFaO01HmXjD+HhSB2/ed8d2q8ZOFpJuIIb4C0=;4:IsH99tFs9zBC3C9YQ6zYdKN51b2BMW9u3/kUr/yTj/noD+od7n4kxfy/a2BkYePOdD8ndpcb/kGJ4InJWyYu267qL/uL6fBEGcXCQWtOM8phoTNFi5BHdLRZmouALOe7FkdsfdNVWSfwarzNAIg1HCzM/XAhL5mUXz90swgxB/uC2iwy3AMjizSG+IUXUOJNrf4A3uV8wAQjV5pbLa044yc84/vRSr3ZV01HArJU85xqK9DiHZFqa7BsD169z9um X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(100000703101)(100105400095)(6041248)(20161123555025)(20161123560025)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:CY1PR07MB2585;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:CY1PR07MB2585; X-Forefront-PRVS: 04238CD941 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6009001)(24454002)(189002)(199003)(53936002)(42186005)(6916009)(101416001)(54906002)(1076002)(305945005)(42882006)(9686003)(2950100002)(47776003)(6496005)(81166006)(81156014)(54356999)(76176999)(8676002)(110136004)(50986999)(68736007)(6246003)(7736002)(105586002)(55016002)(5660300001)(106356001)(72206003)(229853002)(33656002)(4001350100001)(4326008)(93886005)(83506001)(6116002)(3846002)(23726003)(25786009)(2906002)(189998001)(33716001)(6666003)(97736004)(66066001)(50466002)(478600001)(8936002)(18370500001)(32563001);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR07MB2585;H:hc;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;CY1PR07MB2585;23:Vn7wWSBBjp3+m/2UGGxhKDhMm6f84VmsKA+G6Nfgx?= =?us-ascii?Q?+0umo3Siq+1N+GCLwgmMYzs9o4M9eMrK3obychRE/x+4pro8SIxXA4dWcEQj?= =?us-ascii?Q?1bycvvgjRBWuOmQlmiGN/0t7vUTjZa415cjZktA1sdu/xv2B+QH27zxEffXM?= =?us-ascii?Q?rN1ucc57LbNNYe3gXi0GBD2p5cZhsdz0K9K14XQ6mhTbYGpQCdnYMzcecfMs?= =?us-ascii?Q?NT46gqYbgt+G+IPB74l/zaldqcP6XiCqE7pv0PX3mUKGq/ifHrPYcVIjPLUn?= =?us-ascii?Q?VZ37Cmy+fQ89nIz2gkQEyF9ggfJV1sQoLOez7BWNbSFCSFS7XTaJRsxXntun?= =?us-ascii?Q?Q1JKZFdZp18K7Gj2q1VKdDunh+IgL560iyCTpDJv8mxpnXgCrWYHEHp99uXw?= =?us-ascii?Q?CNu1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585;6:RAslcTYLfRo+p+LceP5Je0g+DAR1IXjuPT867GcySCAv2zNfgbbW4obc8r5cfHStRRjoiM6DM05U2qrbqwdrQx34/MuFvLeN/URsAIVuEKPrHZf1OfT8ClSzkdfsB9hm8r81mSb/e/h41pVTZzfraETKlhrMSGj4icliiEfVeN5t7UU7pw+BRGy61GxMQBLlPgVDYQqMfGdxlFkIsdX+ODZOMfHinhkLqPFybxeKGF475KyNhrXzRFyj1HGNDf8D8+Eb1HD+VgIyTy+UuZ8Dt0JbFMjhQHaPeD2eVFFBHQtKXkVLwXDKoiXIXh2Wudz4wPDSR7E4DfarMsPF8/QJHQ==;5:smiShVeMF5LYE+4jYp1flFqFWBwWP1no4WVPtIpq47fYqncV9g/EMC22+XyuOgQe2fYzCfWsOfofsjPBznO+EBMEkks1sxzDxv9JqEb/ZzV+p88PsTkxe48sbGcbCoYwtV4/zF60M5Fgkw8gBM+Ddg==;24:p7B5Jy6wvFc+f1fjQ62nPyaElC3ssD9AVX1uudIJVHqhtrxo0i2xKsuvUl5oiWJ3Khx0C3vpN1NLtm7yNBB2Op0noy6NpP3lTb7FTvdf+8E=;7:15qZXEsyAbQhfbp9oFbXjryO5vS/+m3ZezdHVXpeELQ6EGqsDXI5khVDODi5hBF9ovOw5hQim/WrIJU2nCwi557WCwvZzcUBhG2dY3dK1w1OulyEYsHYuBsyc41WycnMiRBKrsIIXbUX/7axBAaHGdqMJkR+CWulW9cSRhOZgRjl9td9oDkeFsCWw0IUHtZRZEZFF4VWgI2pCzeLOV4LnuuA7N++An4Q/e8tms/I6jM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Sep 2017 07:49:16.5534 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR07MB2585 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 708 Lines: 22 On Thu, Sep 07, 2017 at 09:40:11AM +0200, Jan Glauber wrote: > So what if we add an additional check like: > > diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c > index fdf65a6..389db4b 100644 > --- a/drivers/pci/pci.c > +++ b/drivers/pci/pci.c > @@ -4389,6 +4389,9 @@ static bool pci_slot_resetable(struct pci_slot *slot) > { > struct pci_dev *dev; > > + if (slot->bus->self & PCI_DEV_FLAGS_NO_BUS_RESET) > + return false; > + > list_for_each_entry(dev, &slot->bus->devices, bus_list) { > if (!dev->slot || dev->slot != slot) > continue; Obviously I meant: if (slot->bus->self->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET) --Jan