Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp2820860pxu; Mon, 14 Dec 2020 11:39:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJzQh3usv1IXz5hupUGtH6Me991VfA9Xih8ez5wmqh65jmQx40YmYiW7rmmQax0AbtVapqv0 X-Received: by 2002:a17:906:12cf:: with SMTP id l15mr15382033ejb.540.1607974785917; Mon, 14 Dec 2020 11:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607974785; cv=none; d=google.com; s=arc-20160816; b=wNA1MoYuNqBWCQQMnuajDq2LxPjTuUmJ9MqvRGwQnCejpiLLDH6NE7SIIjR/kncaOF jAnUHHV83ma+IcOmi4cszexw8b1DOy/nWt0+iza92itga0OD/dur5BYjSqb4ARRwGLH5 df6BzO9B0oFmrvvEOjnkgjuaRkjMtlenp+GaYxV/4nS6UBPrir7ourQVXA43TGMaNqXc jzfdMgcEx+BxfX4cEcjGsGaunxkC58ZVELWn9rY8zurtN6XBG9o+vjSb4dp7PMJHWfPL w2zszB6Eihv6sFjYeVD1gic9uS/Dtwy4qLGnFtzzHne1bfg6jk1NRZWgKD1GdkRQ68PB cZ8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=sNA15cRlh9UBXWC1DUTFYUWH0qFfKqULfgKKopxOFyQ=; b=yN/qQ4txfMhlOnnQ3qNGdXt5jS3qpZL+Nc/dSpSQVgIdKTUSlUsmXnQCF5kPDRkMzl ucdn99CbmXdzyl9czEZn1JvANZBvh9wm9P4dEmt8XXlX4+u6w4a0rkVoBj/b9TZWwJ4l e2e7MTCfYuLrNuRTrJIMK1zEejlerXIsj9FJ5UfNu5VacGiQ7+kuJhIHrIujyg0uuLNa /s31DHuw7LuVWd0SlakqoQtEYCieMtt22ZiIVmVPG+GtMxOMiT8Uygv2RWWlN9uRuQxc XP/IgjMwF8ddnHVeaM33Nr1kA0vUvT3bArLPZMNvujLmglfld9ah0lBuLQjddUY/Qzj0 XnHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@dell.com header.s=smtpout1 header.b=rmyGih9t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dell.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m10si8709299eji.137.2020.12.14.11.39.23; Mon, 14 Dec 2020 11:39:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@dell.com header.s=smtpout1 header.b=rmyGih9t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=dell.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2441117AbgLNTfg (ORCPT + 99 others); Mon, 14 Dec 2020 14:35:36 -0500 Received: from mx0b-00154904.pphosted.com ([148.163.137.20]:5026 "EHLO mx0b-00154904.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2440695AbgLNTew (ORCPT ); Mon, 14 Dec 2020 14:34:52 -0500 Received: from pps.filterd (m0170396.ppops.net [127.0.0.1]) by mx0b-00154904.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0BEJWJwj006021; Mon, 14 Dec 2020 14:34:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=smtpout1; bh=sNA15cRlh9UBXWC1DUTFYUWH0qFfKqULfgKKopxOFyQ=; b=rmyGih9tlsJuFJuBhJptupRIF0Qtl+ysl+womFYtR17G+y2g9X4jxl9DMEM/9DaoNbYs 9CDHnWsG3ve27FcD5tL95je/PoT6N7WXla3mom131h6ROJxkyGzLam+1o+XFeAbTKxwU dd6dJusrM8u53QGN2Mzi4oq4ymzW5LbSQc0mFhzse2UgA41/85z0lgIUUPz5n2UVx9WX ciOtqCJc4MV+SdF07TbC7yK3tvkp3dGLfIIxxesKeDF6WshlY1AJcWCsYsFEB1RBQhJ+ 5h444T9bYBTyV1OnIo7+rGQ/BTC5ld6KwZBEmShdJkRO2jZQWRPr76rcy2BvWICx4zM1 ag== Received: from mx0a-00154901.pphosted.com (mx0a-00154901.pphosted.com [67.231.149.39]) by mx0b-00154904.pphosted.com with ESMTP id 35ctk4ejxb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Dec 2020 14:34:09 -0500 Received: from pps.filterd (m0134746.ppops.net [127.0.0.1]) by mx0a-00154901.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 0BEJY6Q2182661; Mon, 14 Dec 2020 14:34:09 -0500 Received: from ausxippc110.us.dell.com (AUSXIPPC110.us.dell.com [143.166.85.200]) by mx0a-00154901.pphosted.com with ESMTP id 35e5emsm0j-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Dec 2020 14:34:07 -0500 X-LoopCount0: from 10.173.37.130 X-PREM-Routing: D-Outbound X-IronPort-AV: E=Sophos;i="5.78,420,1599541200"; d="scan'208";a="1020795052" From: Mario Limonciello To: Jeff Kirsher , Tony Nguyen , intel-wired-lan@lists.osuosl.org Cc: linux-kernel@vger.kernel.org, Netdev , Alexander Duyck , Jakub Kicinski , Sasha Netfin , Aaron Brown , Stefan Assmann , David Miller , darcari@redhat.com, Yijun.Shen@dell.com, Perry.Yuan@dell.com, anthony.wong@canonical.com, Hans de Goede , Mario Limonciello Subject: [PATCH v5 1/4] e1000e: Only run S0ix flows if shutdown succeeded Date: Mon, 14 Dec 2020 13:29:32 -0600 Message-Id: <20201214192935.895174-2-mario.limonciello@dell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201214192935.895174-1-mario.limonciello@dell.com> References: <20201214192935.895174-1-mario.limonciello@dell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.343,18.0.737 definitions=2020-12-14_10:2020-12-11,2020-12-14 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 lowpriorityscore=0 mlxlogscore=999 malwarescore=0 suspectscore=0 bulkscore=0 adultscore=0 priorityscore=1501 spamscore=0 clxscore=1015 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012140129 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 bulkscore=0 malwarescore=0 adultscore=0 spamscore=0 phishscore=0 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012140129 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If the shutdown failed, the part will be thawed and running S0ix flows will put it into an undefined state. Reported-by: Alexander Duyck Reviewed-by: Alexander Duyck Signed-off-by: Mario Limonciello --- drivers/net/ethernet/intel/e1000e/netdev.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c index 128ab6898070..6588f5d4a2be 100644 --- a/drivers/net/ethernet/intel/e1000e/netdev.c +++ b/drivers/net/ethernet/intel/e1000e/netdev.c @@ -6970,13 +6970,14 @@ static __maybe_unused int e1000e_pm_suspend(struct device *dev) e1000e_pm_freeze(dev); rc = __e1000_shutdown(pdev, false); - if (rc) + if (rc) { e1000e_pm_thaw(dev); - - /* Introduce S0ix implementation */ - if (hw->mac.type >= e1000_pch_cnp && - !e1000e_check_me(hw->adapter->pdev->device)) - e1000e_s0ix_entry_flow(adapter); + } else { + /* Introduce S0ix implementation */ + if (hw->mac.type >= e1000_pch_cnp && + !e1000e_check_me(hw->adapter->pdev->device)) + e1000e_s0ix_entry_flow(adapter); + } return rc; } -- 2.25.1