Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp3837143imc; Sun, 24 Feb 2019 14:30:11 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ0vkVJQGWhfcRvYvEDV3cZRHYPKkyLDTI4jZT0Jy0Rmt0jHIbV1dMK+VFoygvAgod6C3HO X-Received: by 2002:a62:6702:: with SMTP id b2mr16365598pfc.244.1551047411379; Sun, 24 Feb 2019 14:30:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551047411; cv=none; d=google.com; s=arc-20160816; b=w8HSzFRZs/tk4IIfnwXT94C7bhjf1nX7229Clxp7ndW7vPzsJkGBzm8591C85kB17z /zQBCqGAoXXwDOTKQt3+F0YZdfqwKeak6hFjO3dUg+jzjK3T73RNzsWQe5/EyOrMi+tc VqOu9SNW/ILFyTVI2dm10juUILfX0in1I1GktN0gd33pcQDhaGSovwE4VITGGnd6knC2 nEvWAqgdzYoXmIfTtMMQGSw/fugStxpJsKF7BXt06ymL7oY7K+Mvygk//UZxBItap4Up lbIgqTdga7v8j42CypD9cAhyiy3i3yMMBO9NyPMAwSOE6LNByzqk07/7IO5F/fdRxyyl 1Myw== 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=hIWpRzpDcriylfjWTW/47SXuiR/3tGTYg8OKZFd1HrA=; b=tRPLcBvNbt6YmkFNEh2cyAfvF+oOXOw5TP2K/SoxaBAh0l5jZdCCtLPQF5Azhs5vCn xkY6hJsX2vrch3Gxo3VlXNkImK8/SLEwzWqqC1sK6BJfNLBOVemWy2StnEVgy8RfkHyU iE8l4byOCYxGYBRn1LFf32tJ1PAjE7I2AL4tMAazzDpyJ7r2Zi2SWSc5jqGCaFxIS5mP 0s04uObhn0hncTtYX1+l2Fg9NS9eHrUBHrbOWAvbwJ3xrCcvXfPcKZdzg8ngKpKZwBNd 5OtKAFRPgqKTAC5sPcVEygqwhiZUv6GgRsoPHXyC7JJvCZiNPKGBXaRVgKvqV3RTLuYJ otWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@dellteam.com header.s=smtpout header.b=k7+41OMv; 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 x1si7387608plr.439.2019.02.24.14.29.23; Sun, 24 Feb 2019 14:30:11 -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=k7+41OMv; 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 S1726877AbfBXW2J (ORCPT + 99 others); Sun, 24 Feb 2019 17:28:09 -0500 Received: from esa3.dell-outbound.iphmx.com ([68.232.153.94]:18121 "EHLO esa3.dell-outbound.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbfBXW2I (ORCPT ); Sun, 24 Feb 2019 17:28:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=dellteam.com; i=@dellteam.com; q=dns/txt; s=smtpout; t=1551047265; x=1582583265; h=cc:from:to:subject:date:message-id:references: content-transfer-encoding:mime-version; bh=fXryVJB11Bct3ZGy6PanoflP1HvJi67XTph04XKYvwg=; b=k7+41OMvd4Stcgt0dzixgsndT2L3//bMMpmOM2G2bieR3fmieNUMgXZ6 qhZ1EzOI6jftJU8Ad5G16M/xQHwrtbC/4UliDK6q403TpmnrdwOLVrgcZ CUPyQ27yY7sU/PHR5aUB4Czb7ONCV3JL4VacVJdMJYBCXB8IIXa8DzjUX o=; X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2EPAAAXGnNchyWd50NlGwEBAQEDAQE?= =?us-ascii?q?BBwMBAQGBUgUBAQELAYJZgRQnCox2jQSBfZYhFIFnCwEBLIRAhAEiNQgNAQM?= =?us-ascii?q?BAQIBAQIBAQIQAQEBCgsJCCkvgjoigm8BAQEBAgESFRM/EAIBCBgeEFcCBBM?= =?us-ascii?q?IEweCfoFrCJ5MPQJtgQGJBwEBAYFrM4oijEiCFoN1LoROARIBBxhNhRQCjA+?= =?us-ascii?q?EQJMKCQWSUyGBcYVbi0OcXAIEAgQFAhSBSAGBHHFwgzyCKA4JE44LQTGBKIw?= =?us-ascii?q?lgR8BgR4BAQ?= X-IPAS-Result: =?us-ascii?q?A2EPAAAXGnNchyWd50NlGwEBAQEDAQEBBwMBAQGBUgUBA?= =?us-ascii?q?QELAYJZgRQnCox2jQSBfZYhFIFnCwEBLIRAhAEiNQgNAQMBAQIBAQIBAQIQA?= =?us-ascii?q?QEBCgsJCCkvgjoigm8BAQEBAgESFRM/EAIBCBgeEFcCBBMIEweCfoFrCJ5MP?= =?us-ascii?q?QJtgQGJBwEBAYFrM4oijEiCFoN1LoROARIBBxhNhRQCjA+EQJMKCQWSUyGBc?= =?us-ascii?q?YVbi0OcXAIEAgQFAhSBSAGBHHFwgzyCKA4JE44LQTGBKIwlgR8BgR4BAQ?= Received: from mx0b-00154901.pphosted.com ([67.231.157.37]) by esa3.dell-outbound.iphmx.com with ESMTP/TLS/AES256-SHA256; 24 Feb 2019 16:27:44 -0600 Received: from pps.filterd (m0144103.ppops.net [127.0.0.1]) by mx0b-00154901.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x1OMNLoB192100; Sun, 24 Feb 2019 17:28:07 -0500 Received: from esa1.dell-outbound2.iphmx.com (esa1.dell-outbound2.iphmx.com [68.232.153.201]) by mx0b-00154901.pphosted.com with ESMTP id 2qu1kfw455-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 24 Feb 2019 17:28:06 -0500 Cc: , , , , , , , , Received: from ausc60pc101.us.dell.com ([143.166.85.206]) by esa1.dell-outbound2.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA256; 25 Feb 2019 04:28:06 +0600 X-LoopCount0: from 10.166.134.85 X-IronPort-AV: E=Sophos;i="5.58,409,1544508000"; d="scan'208";a="1366162022" From: To: Subject: Re: [PATCH RFC v2 2/4] PCI: pciehp: Do not turn off slot if presence comes up after link Thread-Topic: [PATCH RFC v2 2/4] PCI: pciehp: Do not turn off slot if presence comes up after link Thread-Index: AQHUyLqR+ed3yG3ljUu42ub7Hwypsg== Date: Sun, 24 Feb 2019 22:27:53 +0000 Message-ID: References: <20190220012031.10741-1-mr.nuke.me@gmail.com> <20190220012031.10741-3-mr.nuke.me@gmail.com> <20190221073634.snvazxlzgvjhilaz@wunner.de> <20190223064926.mh24zzlj4xykwcjf@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-24_14:,, 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=897 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902240176 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2/23/19 12:50 AM, Lukas Wunner wrote:=0A= > =0A= > [EXTERNAL EMAIL]=0A= > =0A= > On Fri, Feb 22, 2019 at 07:56:28PM +0000, Alex_Gagniuc@Dellteam.com wrote= :=0A= >> On 2/21/19 1:36 AM, Lukas Wunner wrote:=0A= >>> On Tue, Feb 19, 2019 at 07:20:28PM -0600, Alexandru Gagniuc wrote:=0A= >>>> mutex_lock(&ctrl->state_lock);=0A= >>>> + present =3D pciehp_card_present(ctrl);=0A= >>>> + link_active =3D pciehp_check_link_active(ctrl);=0A= >>>> switch (ctrl->state) {=0A= >>>=0A= >>> These two assignments appear to be superfluous as you're also performin= g=0A= >>> them in pciehp_check_link_active().=0A= >>=0A= >> Not sure. Between the first check, and this check, you can have several= =0A= >> seconds elapse depending on whether the driver's .probe()/remove() is=0A= >> invoked. Whatever you got at the beginning would be stale. If you had a= =0A= >> picture dictionary and looked up 'bad idea', it would have a picture of= =0A= >> the above code with the second check removed.=0A= > =0A= > I don't quite follow. You're no longer using the "present" and=0A= > "link_active" variables in pciehp_handle_presence_or_link_change(),=0A= > the variables are set again further down in the function and you're=0A= > *also* reading PDS and DLLLA in is_delayed_presence_up_event().=0A= > So the above-quoted assignments are superfluous. Am I missing something?= =0A= > =0A= > (Sorry, I had copy-pasted the wrong function name, I meant=0A= > is_delayed_presence_up_event() above, not pciehp_check_link_active().=0A= =0A= =0A= I see what I did. You're right. I should remove the following lines from = =0A= the patch. I'll have that fixed when I re-submit this.=0A= =0A= + present =3D pciehp_card_present(ctrl);=0A= + link_active =3D pciehp_check_link_active(ctrl);=0A= =0A= > =0A= >> I've got all the other review comments addressed in my local branch. I'm= =0A= >> waiting on Lord Helgass' decision on which solution is better.=0A= > ^^^^^^^^^^^^=0A= > =0A= > Can we keep this discussion in a neutral tone please?=0A= =0A= I'm sorry. I thought comparing linux to feudalism would be hillarious, =0A= but I now see not everyone agrees. Sorry, Bjorn.=0A= =0A= Alex=0A=