From patchwork Thu Jul 4 06:43:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1956634 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WF6Yz3rmtz1xqs for ; Thu, 4 Jul 2024 16:44:06 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1sPGCH-0001P3-85; Thu, 04 Jul 2024 06:44:01 +0000 Received: from mail-pf1-f181.google.com ([209.85.210.181]) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1sPGCF-0001OZ-Dm for kernel-team@lists.ubuntu.com; Thu, 04 Jul 2024 06:43:59 +0000 Received: by mail-pf1-f181.google.com with SMTP id d2e1a72fcca58-706b539fcaeso1121833b3a.0 for ; Wed, 03 Jul 2024 23:43:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720075437; x=1720680237; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:sender:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=S7RRAFNhdr8LHMPPOgPott8l7Vwp2YN+VEjZ0YCBNQo=; b=FRhHkd1wKK7Gzl1BRmSq2AM3xkDJPro8sO5GuQ8NcXlzbc6VMyQqYjxlDOpF50FYRm VbhgxCKUThC9LpKyn9o65/7qwhCMSOK0zZ/gnVzZQGw1eQmOXb55eUwDmooGITn6YpTD EtP39jkXF53QzoAPIsRJEUWBHYE/4wL0Rm+GxVXNilpW1DywpYgpNfdxFK0yRTr+UW6j 2gOKwtnZnGLvnKYyZ3qaMY1NR2Ag8LKnL0d2Ud7GELrQuqeYgI8ay+WGhJcZv/HmdFjU kxtCLEuqK0DIlUQ/YUPMVHyZOG+qII0kLq5NtnzO7tMP/h/bJiNtbJJgWvBp31MNzXVv 1lcQ== X-Gm-Message-State: AOJu0YyTuOoGTBz9zUVui+q29H5DqwC9hunWJhLRxtV7903kyhWuTpZa rrpweuuRaeFOmBWYw33KUzy+iZImOt2a8UP/Bzq2ZjqvLIHgZ+rvzEL8rw== X-Google-Smtp-Source: AGHT+IFgbKWgiqMOaGy5stmi81EIq1QIrDwuAuPPnAGhX3ItBXEzDTsOnHuxsG9xnQjrGfRE1Tl1Fg== X-Received: by 2002:a05:6a20:3949:b0:1be:c700:fda with SMTP id adf61e73a8af0-1c0cd1c50ffmr913889637.15.1720075436920; Wed, 03 Jul 2024 23:43:56 -0700 (PDT) Received: from localhost (220-135-95-34.hinet-ip.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-708044b0c5csm11487581b3a.167.2024.07.03.23.43.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Jul 2024 23:43:56 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/1][SRU][N] PCI/ASPM: Restore parent state to parent, child state to child Date: Thu, 4 Jul 2024 14:43:52 +0800 Message-ID: <20240704064352.42124-2-acelan.kao@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240704064352.42124-1-acelan.kao@canonical.com> References: <20240704064352.42124-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.181; envelope-from=acelan@gmail.com; helo=mail-pf1-f181.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Kai-Heng Feng BugLink: https://bugs.launchpad.net/bugs/2071889 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") Link: https://lore.kernel.org/r/20240506051602.1990743-1-kai.heng.feng@canonical.com Signed-off-by: Kai-Heng Feng [bhelgaas: update subject] Signed-off-by: Bjorn Helgaas Reviewed-by: Ilpo Järvinen (cherry picked from commit f3d049b35b01fff656d720606fcbab0b819f26d1) Signed-off-by: Chia-Lin Kao (AceLan) --- 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 42fe18e4f8a9..a8c20f2e3a46 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); } }