Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp728798imj; Wed, 13 Feb 2019 16:39:56 -0800 (PST) X-Google-Smtp-Source: AHgI3IZDyNZaoeGzBAch9Q8CzWQOdbxYdK7rTnsSdGAgoGDttFKZFl/qXRQ/3qLv1mWUItM5WFJx X-Received: by 2002:a65:620a:: with SMTP id d10mr949496pgv.75.1550104796208; Wed, 13 Feb 2019 16:39:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550104796; cv=none; d=google.com; s=arc-20160816; b=Vyyj7cBgZswmMT1wbUNuJ2f7bybolYVqrxOzPOmG5QfJZ7HIQtw3rTv6nZPmeCRkIo SHVoMQKFblFgTF7Lge6kxcTmw/+uUg4zFIFQb6fsn8AlQ53qrACLxqyicBnJswX/qIZF tSJPR108oBn4Bd0qbDrBPEETXtxTSRFiDFBcR/lItTTUaPKMM+YTKkxIfeDq6SxaiZrL z3S3NFunK1mSCZsL4G6c++yr4mhHX9cpFs7tpEF6eHOE/z5UCpnFHPpxmARQW+jKmER8 5jENR5/klRy9w46mdUtZhjaCC7sTGT0rimmMIdexSlXn8TboYjLyrUpqdR5fby2xjFGB MckA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:references:message-id:date :thread-index:thread-topic:subject:to:from:cc:dkim-signature; bh=m740+CdYHTWl/omiWbHiGHsYtwspi2xhoPtHGwQSFpU=; b=h3Jofqduin3vYG0ZLSzZI6fgw6VqU4shyCNqNbnNH/ggWIqIQK7b0+gVWhfpAkpkTX IU/bKd7wcKe9KK7FId9472RaBL3Gg+BextcoGAoo5Ycs5/hmnCFYod8p4pjEomHAwrQx QZYvdxsiWIA6jMsQ4DoiQR250OpPcPVXw0UgBLSJ/HmEBQ16LrsvNzSRRuVlHIghT042 Q+8C9byYN7XLcSw8spCbIMAKpoZn8INFfwiDL/MIB3Xtl/7yxTVBzDGl8bD/tEYYkAT3 dvI2QvBDatKkCyNK+XmKzmM/vLe/OvbyqV4aYttW9y6VrXEBfrBR6wOjdy4B1QOB9lkq V5Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@dellteam.com header.s=smtpout header.b=w6avBZiY; 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 f7si810989plr.96.2019.02.13.16.39.40; Wed, 13 Feb 2019 16:39:56 -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; dkim=fail header.i=@dellteam.com header.s=smtpout header.b=w6avBZiY; 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 S2394322AbfBMSzw (ORCPT + 99 others); Wed, 13 Feb 2019 13:55:52 -0500 Received: from esa3.dell-outbound.iphmx.com ([68.232.153.94]:10295 "EHLO esa3.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726277AbfBMSzv (ORCPT ); Wed, 13 Feb 2019 13:55:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dellteam.com; i=@dellteam.com; q=dns/txt; s=smtpout; t=1550084142; x=1581620142; h=cc:from:to:subject:date:message-id:references: content-transfer-encoding:mime-version; bh=oEoh43nRADGmAp/RzU36FMbey/Ilw0wJ5l7YR+zZmbs=; b=w6avBZiYo4n+e/zZbLOSCnUjmdl3EaXY4tQHZu3Y+bxJphjWgDHZfDc+ gTUDuIsftI5CFOLJIyKcvMlF2DfA5FskYe6zDomWvZXQYKM47WeYNA6y0 4cQadTXAJvCMly40L/lZjewFmmea7cNkvLuqN5/yfD4mro8EeIJyWLoBT 8=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EKAABGZ2RchyeV50NjGwEBAQEDAQE?= =?us-ascii?q?BBwMBAQGBUgUBAQELAYFaf4EUMYx0ixSCDZgTFIFnCwEBLIFLgnWDXCI1CA0?= =?us-ascii?q?BAwEBAgEBAgEBAhABAQEKCwkIKS+COiKCbwEBAQMBEig/BQsCAQgYHhBXAgQ?= =?us-ascii?q?bFAaCN0uBegieMj0CbYEBiQcBAQGCHoovjESCFoN1LoRqF02FEwKMBZciCQW?= =?us-ascii?q?SRiGSb5wdAgQCBAUCFIFHAYINcIM9gjWBCQEJjRRBgVmNMQGBHgEB?= X-IPAS-Result: =?us-ascii?q?A2EKAABGZ2RchyeV50NjGwEBAQEDAQEBBwMBAQGBUgUBA?= =?us-ascii?q?QELAYFaf4EUMYx0ixSCDZgTFIFnCwEBLIFLgnWDXCI1CA0BAwEBAgEBAgEBA?= =?us-ascii?q?hABAQEKCwkIKS+COiKCbwEBAQMBEig/BQsCAQgYHhBXAgQbFAaCN0uBegieM?= =?us-ascii?q?j0CbYEBiQcBAQGCHoovjESCFoN1LoRqF02FEwKMBZciCQWSRiGSb5wdAgQCB?= =?us-ascii?q?AUCFIFHAYINcIM9gjWBCQEJjRRBgVmNMQGBHgEB?= Received: from mx0a-00154901.pphosted.com ([67.231.149.39]) by esa3.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 13 Feb 2019 12:55:42 -0600 Received: from pps.filterd (m0134746.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1DIrVq1100854; Wed, 13 Feb 2019 13:55:49 -0500 Received: from esa5.dell-outbound2.iphmx.com (esa5.dell-outbound2.iphmx.com [68.232.153.203]) by mx0a-00154901.pphosted.com with ESMTP id 2qmmwp9qyt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 13 Feb 2019 13:55:49 -0500 Cc: , , , , , , , Received: from ausxipps306.us.dell.com ([143.166.148.156]) by esa5.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 14 Feb 2019 00:55:43 +0600 X-LoopCount0: from 10.166.134.85 X-IronPort-AV: E=Sophos;i="5.58,366,1544508000"; d="scan'208";a="272207396" From: To: Subject: Re: [PATCH] PCI: pciehp: Do not turn off slot if presence comes up after link Thread-Topic: [PATCH] PCI: pciehp: Do not turn off slot if presence comes up after link Thread-Index: AQHUvZbN4kEiyNA8xUGy+Uw4G87SXw== Date: Wed, 13 Feb 2019 18:55:46 +0000 Message-ID: <205e0fd9995a4f2b80ab370a974b6628@ausx13mps321.AMER.DELL.COM> References: <20190205210701.25387-1-mr.nuke.me@gmail.com> <20190209115849.244u67h7wmn3eb7o@wunner.de> <52afa1c45f684dbda6a8771b65583a22@ausx13mps321.AMER.DELL.COM> <20190212083031.2no7mzn5xug7nba3@wunner.de> <20190213083632.GA3387@wunner.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [143.166.11.234] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-02-13_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902130130 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/13/19 2:36 AM, Lukas Wunner wrote:=0A= >> (*) A bit hypothetical: There is no hardware yet implementing the ECN.= =0A= > =0A= > Hm, this contradicts Austin Bolen's e-mail of Jan 25 that "Yes, this=0A= > platform disables in-band presence" (when asked whether your host=0A= > controller already adheres to the ECN).=0A= =0A= Both statements are true. The hardware does indeed disable in-band =0A= presence, in a rudimentary way that is not compliant with the ECN -- it =0A= doesn't implement the bits required by the ECN.=0A= =0A= =0A= >> I'm=0A= >> not sure that there is a spec-justifiable reason to not access a device= =0A= >> whose DLL is up, but PD isn't.=0A= > =0A= > Austin asked in an e-mail of Jan 24 whether "the hot-inserted device's=0A= > config space [is] accessed immediately after waiting this 20 + 100 ms=0A= > delay", which sounded to me like you'd prefer the device not to be=0A= > accessed until PDS is 1.=0A= =0A= "Unless Readiness Notifications mechanisms are used (see Section 6.23), =0A= the Root Complex and/or system software must allow at least 1.0 s after =0A= a Conventional Reset of a device, before it may determine that a device =0A= which fails to return a Successful Completion status for a valid =0A= Configuration Request is a broken device. This period is independent of =0A= how quickly Link training completes."=0A= (Section 6.6)=0A= =0A= The concern was the one second delay, which is addressed by the use of =0A= pci_bus_wait_crs().=0A= =0A= >>> Be mindful however that pcie_wait_for_link() is also called from the=0A= >>> DPC driver. Keith should be able to judge whether a change to that=0A= >>> function breaks DPC.=0A= >>=0A= >> That's why I went for ammending pciehp_handle_presence_or_link_change().= =0A= >> Smaller bug surface ;). What I'm thinking at this point is, keep the=0A= >> patch as is, but, also check for in-band PD disable before aborting the= =0A= >> shutdown. Old behavior stays the same.=0A= > =0A= > I'm worried that amending pciehp_handle_presence_or_link_change() makes= =0A= > the event handling logic more difficult to understand.=0A= =0A= Don't worry. It's already difficult to understand ;)=0A= =0A= > Polling PDS in=0A= > pcie_wait_for_link() or disabling either PDC or DLLSC if in-band presence= =0A= > is disabled seems simpler to reason about.=0A= =0A= pcie_wait_for_link() is generic PCIe layer. I don't think mixing hotplug = =0A= concepts is a good layering violation.=0A= =0A= Disabling PDC or DLLSC can work. I've sometimes wondered why we even =0A= care about PDC. I can imagine situations where platform might want to =0A= signal imminent removal by yanking PD.=0A= =0A= >> in-band PD disable (what's a good acronym for that, BTW?)=0A= > =0A= > I don't know, maybe inband_presence_disabled?=0A= =0A= PCI_EXP_SLTCAP2_IBPD ?=0A=