diff mbox series

[FIXUP,Bionic] UBUNTU: PCI: mediatek: Fixup MSI enablement logic by enabling MSI before clocks

Message ID 20191219142721.3472-1-kamal@canonical.com
State New
Headers show
Series [FIXUP,Bionic] UBUNTU: PCI: mediatek: Fixup MSI enablement logic by enabling MSI before clocks | expand

Commit Message

Kamal Mostafa Dec. 19, 2019, 2:27 p.m. UTC
BugLink: https://bugs.launchpad.net/bugs/1854975

[ Upstream commit 3828d60fd2ef99f97a677c1f95af2ab3e65e2576 ]

The Bionic backport of upstream stable commit
3828d60fd2ef ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
before clocks") accidentally ommited this hunk.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---

NOTE:

This patch could optimally be squash-fixed into the as yet unreleased
bionic/master-next "Fixup MSI enablement" commit, currently this SHA:

f40e837a2ab4 ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
before clocks")

 -Kamal


 drivers/pci/host/pcie-mediatek.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Kleber Sacilotto de Souza Dec. 19, 2019, 2:50 p.m. UTC | #1
On 19.12.19 15:27, Kamal Mostafa wrote:
> BugLink: https://bugs.launchpad.net/bugs/1854975
> 
> [ Upstream commit 3828d60fd2ef99f97a677c1f95af2ab3e65e2576 ]
> 
> The Bionic backport of upstream stable commit
> 3828d60fd2ef ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
> before clocks") accidentally ommited this hunk.
> 
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>

The fixup makes sense to me.

We can definitely squash it as the original commit hasn't been included
in any release yet.

Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>

> ---
> 
> NOTE:
> 
> This patch could optimally be squash-fixed into the as yet unreleased
> bionic/master-next "Fixup MSI enablement" commit, currently this SHA:
> 
> f40e837a2ab4 ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
> before clocks")
> 
>  -Kamal
> 
> 
>  drivers/pci/host/pcie-mediatek.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
> index b58338f3ff60..79bd4b0a90a5 100644
> --- a/drivers/pci/host/pcie-mediatek.c
> +++ b/drivers/pci/host/pcie-mediatek.c
> @@ -653,6 +653,9 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
>  	val &= ~INTX_MASK;
>  	writel(val, port->base + PCIE_INT_MASK);
>  
> +	if (IS_ENABLED(CONFIG_PCI_MSI))
> +		mtk_pcie_enable_msi(port);
> +
>  	/* Set AHB to PCIe translation windows */
>  	size = mem->end - mem->start;
>  	val = lower_32_bits(mem->start) | AHB2PCIE_SIZE(fls(size));
>
Connor Kuehl Dec. 20, 2019, 4:42 p.m. UTC | #2
On 12/19/19 6:27 AM, Kamal Mostafa wrote:
> BugLink: https://bugs.launchpad.net/bugs/1854975
> 
> [ Upstream commit 3828d60fd2ef99f97a677c1f95af2ab3e65e2576 ]
> 
> The Bionic backport of upstream stable commit
> 3828d60fd2ef ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
> before clocks") accidentally ommited this hunk.
> 
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>


Acked-by: Connor Kuehl <connor.kuehl@canonical.com>

> ---
> 
> NOTE:
> 
> This patch could optimally be squash-fixed into the as yet unreleased
> bionic/master-next "Fixup MSI enablement" commit, currently this SHA:
> 
> f40e837a2ab4 ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
> before clocks")
> 
>   -Kamal
> 
> 
>   drivers/pci/host/pcie-mediatek.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
> index b58338f3ff60..79bd4b0a90a5 100644
> --- a/drivers/pci/host/pcie-mediatek.c
> +++ b/drivers/pci/host/pcie-mediatek.c
> @@ -653,6 +653,9 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
>   	val &= ~INTX_MASK;
>   	writel(val, port->base + PCIE_INT_MASK);
>   
> +	if (IS_ENABLED(CONFIG_PCI_MSI))
> +		mtk_pcie_enable_msi(port);
> +
>   	/* Set AHB to PCIe translation windows */
>   	size = mem->end - mem->start;
>   	val = lower_32_bits(mem->start) | AHB2PCIE_SIZE(fls(size));
>
Andrea Righi Dec. 20, 2019, 4:45 p.m. UTC | #3
On Thu, Dec 19, 2019 at 06:27:21AM -0800, Kamal Mostafa wrote:
> BugLink: https://bugs.launchpad.net/bugs/1854975
> 
> [ Upstream commit 3828d60fd2ef99f97a677c1f95af2ab3e65e2576 ]
> 
> The Bionic backport of upstream stable commit
> 3828d60fd2ef ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
> before clocks") accidentally ommited this hunk.
> 
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
> 
> NOTE:
> 
> This patch could optimally be squash-fixed into the as yet unreleased
> bionic/master-next "Fixup MSI enablement" commit, currently this SHA:
> 
> f40e837a2ab4 ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
> before clocks")
> 
>  -Kamal
> 
> 
>  drivers/pci/host/pcie-mediatek.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
> index b58338f3ff60..79bd4b0a90a5 100644
> --- a/drivers/pci/host/pcie-mediatek.c
> +++ b/drivers/pci/host/pcie-mediatek.c
> @@ -653,6 +653,9 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
>  	val &= ~INTX_MASK;
>  	writel(val, port->base + PCIE_INT_MASK);
>  
> +	if (IS_ENABLED(CONFIG_PCI_MSI))
> +		mtk_pcie_enable_msi(port);
> +
>  	/* Set AHB to PCIe translation windows */
>  	size = mem->end - mem->start;
>  	val = lower_32_bits(mem->start) | AHB2PCIE_SIZE(fls(size));
> -- 
> 2.17.1

Makes sense to me.

Acked-by: Andrea Righi <andrea.righi@canonical.com>
Khalid Elmously Dec. 20, 2019, 5:29 p.m. UTC | #4
On 2019-12-19 06:27:21 , Kamal Mostafa wrote:
> BugLink: https://bugs.launchpad.net/bugs/1854975
> 
> [ Upstream commit 3828d60fd2ef99f97a677c1f95af2ab3e65e2576 ]
> 
> The Bionic backport of upstream stable commit
> 3828d60fd2ef ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
> before clocks") accidentally ommited this hunk.
> 
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
> 
> NOTE:
> 
> This patch could optimally be squash-fixed into the as yet unreleased
> bionic/master-next "Fixup MSI enablement" commit, currently this SHA:
> 
> f40e837a2ab4 ("PCI: mediatek: Fixup MSI enablement logic by enabling MSI
> before clocks")
> 
>  -Kamal
> 
> 
>  drivers/pci/host/pcie-mediatek.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
> index b58338f3ff60..79bd4b0a90a5 100644
> --- a/drivers/pci/host/pcie-mediatek.c
> +++ b/drivers/pci/host/pcie-mediatek.c
> @@ -653,6 +653,9 @@ static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
>  	val &= ~INTX_MASK;
>  	writel(val, port->base + PCIE_INT_MASK);
>  
> +	if (IS_ENABLED(CONFIG_PCI_MSI))
> +		mtk_pcie_enable_msi(port);
> +
>  	/* Set AHB to PCIe translation windows */
>  	size = mem->end - mem->start;
>  	val = lower_32_bits(mem->start) | AHB2PCIE_SIZE(fls(size));
> -- 
> 2.17.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team
diff mbox series

Patch

diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c
index b58338f3ff60..79bd4b0a90a5 100644
--- a/drivers/pci/host/pcie-mediatek.c
+++ b/drivers/pci/host/pcie-mediatek.c
@@ -653,6 +653,9 @@  static int mtk_pcie_startup_port_v2(struct mtk_pcie_port *port)
 	val &= ~INTX_MASK;
 	writel(val, port->base + PCIE_INT_MASK);
 
+	if (IS_ENABLED(CONFIG_PCI_MSI))
+		mtk_pcie_enable_msi(port);
+
 	/* Set AHB to PCIe translation windows */
 	size = mem->end - mem->start;
 	val = lower_32_bits(mem->start) | AHB2PCIE_SIZE(fls(size));