Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2060654ybv; Sat, 8 Feb 2020 12:24:43 -0800 (PST) X-Google-Smtp-Source: APXvYqwqzWtWYZyztF18bImjI1C8nah1/aJNSmwJqj/1n4ZvpFWNyYv9WDMmjalcKoYxM4gmewcc X-Received: by 2002:a9d:6b17:: with SMTP id g23mr4612370otp.139.1581193482933; Sat, 08 Feb 2020 12:24:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581193482; cv=none; d=google.com; s=arc-20160816; b=vA4Yc5z5pAvKs+ap2BDtBaJrRkZP10WveVPMulerM/73Y9ongHrylwIf/+Mn0uf/Ih 3eCl2zIJScZ4cqdGnnWki+efEQb0I3TrGrwggia8HU1wkhfZM0r7IZtO15YsCsOlEa6y pb3LRBZ/JmC2reLBzdur4t8G1+7Fr/dwWttJeBYEoZ0Qwx8HCblBlcZqdbC4uDK4itKS iBCgpu5DA0yvTXENUnQsQ/OgVCKHNPfZyXPMGSaOcJxjFXEuzxyP6RAWK84K/FOA13Ts KEkDTpkOc+8xbKW48xzrlYLdvg7SlPxD9OOlxWUBm3xhyU76mcoV5MjXC354D0fVFBC9 dYiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=EcISYB5/WEdWxTqVrdeTOawqKABVMQ54NM4P9e/DZog=; b=bkG3+dRVNCi3F766YltXzJcadmYl07pPjexf0A5Dk+SpHpd07R1OjVHQUJyYwahHgf j43rUZMCRR5XDIkF9irhubC+lwU6xZK1BkcHkJ1jBs2/0d+DudykwjRFXobQaiFghWfs XvdJPXCEDLwkUlkIreP8/0PshiqjNDdV9u2G5v1it14Qe0o59ABI7/CSMjYTmPzsWiRI 4dVz1WRjfvbdfGv1zJfCmg1dI2Sr1822fRAJgtzVdOLuptxdJMWxhJqVj9W+PnkDCoZW QHk90EMQHL3UVQw9Ycpcwf3pqqp6J7x49D/qsy8JHdNmgC4T6LpAuxhNVNBejjblMJTM N7Ow== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l26si2242236otd.143.2020.02.08.12.24.31; Sat, 08 Feb 2020 12:24:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727507AbgBHUW4 (ORCPT + 99 others); Sat, 8 Feb 2020 15:22:56 -0500 Received: from bmailout1.hostsharing.net ([83.223.95.100]:56803 "EHLO bmailout1.hostsharing.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727471AbgBHUWz (ORCPT ); Sat, 8 Feb 2020 15:22:55 -0500 Received: from h08.hostsharing.net (h08.hostsharing.net [83.223.95.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.hostsharing.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (not verified)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 524D930000952; Sat, 8 Feb 2020 21:22:53 +0100 (CET) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 1B22B777F0; Sat, 8 Feb 2020 21:22:53 +0100 (CET) Date: Sat, 8 Feb 2020 21:22:53 +0100 From: Lukas Wunner To: Stuart Hayes , Bjorn Helgaas Cc: Austin Bolen , keith.busch@intel.com, Alexandru Gagniuc , Mika Westerberg , Andy Shevchenko , Sinan Kaya , Oza Pawandeep , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Oliver Neukum , Libor Pechacek Subject: Re: [PATCH v4 0/3] PCI: pciehp: Do not turn off slot if presence comes up after link Message-ID: <20200208202253.ixvnecn52u3rdoas@wunner.de> References: <20191025190047.38130-1-stuart.w.hayes@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191025190047.38130-1-stuart.w.hayes@gmail.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 25, 2019 at 03:00:44PM -0400, Stuart Hayes wrote: > In older PCIe specs, PDS (presence detect) would come up when the > "in-band" presence detect pin connected, and would be up before DLLLA > (link active). > > In PCIe 4.0 (as an ECN) and in PCIe 5.0, there is a new bit to show if > in-band presence detection can be disabled for the slot, and another bit > that disables it--and a recommendation that it should be disabled if it > can be. In addition, certain OEMs disable in-band presence detection > without implementing these bits. > > This means it is possible to get a "card present" interrupt after the > link is up and the driver is loaded. This causes an erroneous removal > of the device driver, followed by an immediate re-probing. > > This patch set defines these new bits, uses them to disable in-band > presence detection if it can be, waits for PDS to go up if in-band > presence detection is disabled, and adds a DMI table that will let us > know if we should assume in-band presence is disabled on a system. FWIW, this series is Reviewed-by: Lukas Wunner Looking at the patches again today, I only spotted a minor cosmetic issue: In patch [1/3] I would have preferred readout of the PCI_EXP_SLTCAP2 register (hunk #3) to be inserted a little further up in pcie_init(), perhaps before reading the PCI_EXP_LNKCAP register. It just looks a little out of place at the end of the function. I would have grouped it together with the other quirks and feature checks further up in the function and I probably would have amended the ctrl_info() to print the status of the inband_presence_disabled flag. In patch [3/3] the DMI check would then likewise have to be moved up in the function. Maybe Bjorn can make this change when applying, and if not, it's not a big deal. Thanks, Lukas