linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] PCI/PM: Fix wrong field set when config L1SS
@ 2020-03-12 11:23 Yicong Yang
  2020-03-12 19:42 ` Bjorn Helgaas
  0 siblings, 1 reply; 2+ messages in thread
From: Yicong Yang @ 2020-03-12 11:23 UTC (permalink / raw)
  To: helgaas, linux-pci, rajatja; +Cc: f.fangjian, huangdaode

We enable proper L1 substates in the end of pcie_config_aspm_l1ss(). It's
PCI_L1SS_CTL1_L1SS_MASK field should we set in PCI_L1SS_CTL1 register
rather than PCI_L1SS_CAP_L1_PM_SS.

Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>
---
 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 0dcd443..c2596e7 100644
--- a/drivers/pci/pcie/aspm.c
+++ b/drivers/pci/pcie/aspm.c
@@ -747,9 +747,9 @@ static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state)
 
 	/* Enable what we need to enable */
 	pci_clear_and_set_dword(parent, up_cap_ptr + PCI_L1SS_CTL1,
-				PCI_L1SS_CAP_L1_PM_SS, val);
+				PCI_L1SS_CTL1_L1SS_MASK, val);
 	pci_clear_and_set_dword(child, dw_cap_ptr + PCI_L1SS_CTL1,
-				PCI_L1SS_CAP_L1_PM_SS, val);
+				PCI_L1SS_CTL1_L1SS_MASK, val);
 }
 
 static void pcie_config_aspm_dev(struct pci_dev *pdev, u32 val)
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] PCI/PM: Fix wrong field set when config L1SS
  2020-03-12 11:23 [PATCH] PCI/PM: Fix wrong field set when config L1SS Yicong Yang
@ 2020-03-12 19:42 ` Bjorn Helgaas
  0 siblings, 0 replies; 2+ messages in thread
From: Bjorn Helgaas @ 2020-03-12 19:42 UTC (permalink / raw)
  To: Yicong Yang; +Cc: linux-pci, rajatja, f.fangjian, huangdaode

On Thu, Mar 12, 2020 at 07:23:11PM +0800, Yicong Yang wrote:
> We enable proper L1 substates in the end of pcie_config_aspm_l1ss(). It's
> PCI_L1SS_CTL1_L1SS_MASK field should we set in PCI_L1SS_CTL1 register
> rather than PCI_L1SS_CAP_L1_PM_SS.
> 
> Signed-off-by: Yicong Yang <yangyicong@hisilicon.com>

Would you mind digging up the commit that broke this and including it
in the log message?  Then we can see if this fix should go to stable
and, if so, how far back.

> ---
>  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 0dcd443..c2596e7 100644
> --- a/drivers/pci/pcie/aspm.c
> +++ b/drivers/pci/pcie/aspm.c
> @@ -747,9 +747,9 @@ static void pcie_config_aspm_l1ss(struct pcie_link_state *link, u32 state)
>  
>  	/* Enable what we need to enable */
>  	pci_clear_and_set_dword(parent, up_cap_ptr + PCI_L1SS_CTL1,
> -				PCI_L1SS_CAP_L1_PM_SS, val);
> +				PCI_L1SS_CTL1_L1SS_MASK, val);
>  	pci_clear_and_set_dword(child, dw_cap_ptr + PCI_L1SS_CTL1,
> -				PCI_L1SS_CAP_L1_PM_SS, val);
> +				PCI_L1SS_CTL1_L1SS_MASK, val);
>  }
>  
>  static void pcie_config_aspm_dev(struct pci_dev *pdev, u32 val)
> -- 
> 2.8.1
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-12 19:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-12 11:23 [PATCH] PCI/PM: Fix wrong field set when config L1SS Yicong Yang
2020-03-12 19:42 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).