Received: by 2002:ab2:7b86:0:b0:1f7:5705:b850 with SMTP id q6csp1187739lqh; Sun, 5 May 2024 22:19:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUw9O8sKQELRv3iKy1P73Yy0ieiVbCvf0bSu8/ck8apGU7zDahxPq1WcJpP0yIzlBnLR25s0pY69B2YRRje56MENv5fiujmmTOz4j3MBQ== X-Google-Smtp-Source: AGHT+IHuYzkYoUqFvWI034R97L5F6ueVJAXDlOLZCC0ZYpbfqJtgi4lJj/IUMbdF4kRMRYvI05/j X-Received: by 2002:a05:6a00:1943:b0:6ea:d004:33c9 with SMTP id s3-20020a056a00194300b006ead00433c9mr9668659pfk.30.1714972771157; Sun, 05 May 2024 22:19:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714972771; cv=pass; d=google.com; s=arc-20160816; b=YheAveP1vgdWxUsvnhLHc81gcScS0+oVi0dWM0HxiEm5pi1kGQTF/a9CziufAWPkv2 qG2c2ng681H7/w7g3oywdYE4GQ2mgxCyjCy3+XLD9E7XOnv3jRashqKmEnLbWUVuZL7P uCaRa3paUJn5esB3B63ruJ5ZtQnKSt/XZgeQdf/Tm9KjKvIUxBHCM9TVwyj3RorvhJZi 3pBryAZl7NrHvcBaasg9WdF8NepBGzCLVkQ3HNFxCvE8ReRy/J6t/CdZIyWsfU2LL5Du 3r27qygqTPbyd6Dv5lc8fPWfFUiW8QH0X9DBwTpkMgtIMvWSUlndNQ6lQ/pk1lzEJnJz S4TA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=Qnp0PiHfp/IWPOg0CPvvM5+8flE+F+e1B4j4lhgtslo=; fh=tPYFNVVhnGXW9O9TJbmXRJ6zmi5keXGE0rsPWPJBFtY=; b=Fg17V0CsoiiYajG6PMtA17+sLszg1Wco72buT3HMiVPHJhSngt8Miw0nfFQuTasCmR bIHGvieTHj/6mwXOWMR4taP/snjIZcEbtqgLdAmq58ujS5+BlMnHc23KzM97Tvc9X4pl +eYXYjevFiiwZXmoUkzdD+iXMsMlOl/NWkOj+4IygHOy6VJkC7HeaDiNuaLCdmUEviTZ yktLmTG9Tg+vjILvj1jwGCIdKE+yc3Z30brNUyBs19hKAOvlB/v4lz7it0mJazskKA4e EZ/MR5BaIMNE/x17FUz3P08bgvwXrX0XfEv/+3nwlgdRshtMqmjM4uKEI4BeL8cQgkl9 /awQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=szvGy2CX; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-169310-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f19-20020a056a00229300b006f474ee5069si2139680pfe.337.2024.05.05.22.19.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 May 2024 22:19:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-169310-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=szvGy2CX; arc=pass (i=1 spf=pass spfdomain=canonical.com dkim=pass dkdomain=canonical.com dmarc=pass fromdomain=canonical.com); spf=pass (google.com: domain of linux-kernel+bounces-169310-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-169310-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id C188B2815C1 for ; Mon, 6 May 2024 05:19:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4D22C47F5B; Mon, 6 May 2024 05:19:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b="szvGy2CX" Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA1D41EEE9; Mon, 6 May 2024 05:19:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.125.188.120 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714972762; cv=none; b=iIfWXBTCaZkAPvQBjCn79/Ku9hveRD/6tfHIUc5z2iXDBw/+WvhOR5LDl45MlEozv8EreplneSWKdxhq5Kd+DfZ7CQpMzL0OSncKBCEIScgQU69GBT1+cctbZt1QzOkG+N2qQGT6rP1DmZUs5mh+mN5SKQLG9mYumIVN8jvyyQU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714972762; c=relaxed/simple; bh=06dEbMSkhU9EKB1BJ/UZAAMDB1nCMvvV1Dugt5xzYHM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=bgkIRczWHYKEZ3TSFkJQn3zWdSrr3ElknG110sOXwDZz7PHhzUI3GsdIBWWe+5cdobkeZAhzoi6LjFtB4pKW5ICfxeGRuhqJ2vQDjLrWxPtkNtUKBxyxgbvginkM3ZBzMpIARN8b0JKVpuiYmXZaYNNEy1TwZCZkJ3O8hwsWR9o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com; spf=pass smtp.mailfrom=canonical.com; dkim=pass (2048-bit key) header.d=canonical.com header.i=@canonical.com header.b=szvGy2CX; arc=none smtp.client-ip=185.125.188.120 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=canonical.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=canonical.com Received: from localhost.localdomain (unknown [10.101.196.174]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 7FE463FA40; Mon, 6 May 2024 05:19:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1714972752; bh=Qnp0PiHfp/IWPOg0CPvvM5+8flE+F+e1B4j4lhgtslo=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=szvGy2CXefq21TLJk28pDEqa4UKl21fkOjhZTWOh+zcKI4o/wJA6lw0z7y16r63HL p4nUbeiVNbLVSDobRQiyoAElWdh0mHDGrNOXw+qn1ScqSZgnmlVGFnnBiQBAV+kBHF dtD1xiNkhph5LDB2nOvPt14+PXVUEJYp/hdkx+RvYu8hVtIpgwlzt41fKtArPrCkDS y3KZkQwnamr+DW36U5p7nm4/9f91V2tC6JLsuMpWeAsYCKGh14v7IIlYah1ZRMxZOA zCpnS/xgLACUT1Tn2In8KxsPg4b/4UVcOnRn2Fp9C65tivX6LDK2KTJWHG0113XBfa khfxe3A+iAOaA== From: Kai-Heng Feng To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Kai-Heng Feng Subject: [PATCH] PCI/ASPM: Fix a typo in ASPM restoring logic Date: Mon, 6 May 2024 13:16:02 +0800 Message-Id: <20240506051602.1990743-1-kai.heng.feng@canonical.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit There's a typo that makes parent device uses child LNKCTL value and vice versa. This causes Micron NVMe to trigger a reboot upon system resume. Correct the typo to fix the issue. Fixes: 64dbb2d70744 ("PCI/ASPM: Disable L1 before configuring L1 Substates") Signed-off-by: Kai-Heng Feng --- drivers/pci/pcie/aspm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pcie/aspm.c b/drivers/pci/pcie/aspm.c index 2428d278e015..47761c7ef267 100644 --- a/drivers/pci/pcie/aspm.c +++ b/drivers/pci/pcie/aspm.c @@ -177,8 +177,8 @@ void pci_restore_aspm_l1ss_state(struct pci_dev *pdev) /* Restore L0s/L1 if they were enabled */ if (FIELD_GET(PCI_EXP_LNKCTL_ASPMC, clnkctl) || FIELD_GET(PCI_EXP_LNKCTL_ASPMC, plnkctl)) { - pcie_capability_write_word(parent, PCI_EXP_LNKCTL, clnkctl); - pcie_capability_write_word(pdev, PCI_EXP_LNKCTL, plnkctl); + pcie_capability_write_word(parent, PCI_EXP_LNKCTL, plnkctl); + pcie_capability_write_word(pdev, PCI_EXP_LNKCTL, clnkctl); } } -- 2.34.1