From 717a8b5a3cc335ba3ce7d951f16752c7c85d8366 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Wed, 30 Aug 2017 21:24:41 +0100 Subject: [PATCH] Fix for QCom Dragonboard USB --- kernel.spec | 6 +++ ...i_hdrc_msm_probe-missing-of_node_get.patch | 45 +++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 qcom-msm-ci_hdrc_msm_probe-missing-of_node_get.patch diff --git a/kernel.spec b/kernel.spec index 43ee7ca1b..86300a6c7 100644 --- a/kernel.spec +++ b/kernel.spec @@ -615,6 +615,9 @@ Patch312: qcom-display-iommu.patch # https://patchwork.kernel.org/patch/9839803/ Patch313: qcom-Force-host-mode-for-USB-on-apq8016-sbc.patch +# https://patchwork.kernel.org/patch/9850189/ +Patch314: qcom-msm-ci_hdrc_msm_probe-missing-of_node_get.patch + # http://www.spinics.net/lists/dri-devel/msg132235.html Patch320: bcm283x-vc4-Fix-OOPSes-from-trying-to-cache-a-partially-constructed-BO..patch @@ -2206,6 +2209,9 @@ fi # # %changelog +* Wed Aug 30 2017 Peter Robinson +- Fix for QCom Dragonboard USB + * Wed Aug 30 2017 Laura Abbott - 4.13.0-0.rc7.git2.1 - Linux v4.13-rc7-15-g36fde05f3fb5 diff --git a/qcom-msm-ci_hdrc_msm_probe-missing-of_node_get.patch b/qcom-msm-ci_hdrc_msm_probe-missing-of_node_get.patch new file mode 100644 index 000000000..bc1884782 --- /dev/null +++ b/qcom-msm-ci_hdrc_msm_probe-missing-of_node_get.patch @@ -0,0 +1,45 @@ +From patchwork Tue Jul 18 23:31:28 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: usb: chipidea: msm: ci_hdrc_msm_probe() missing of_node_get() +From: Frank Rowand +X-Patchwork-Id: 9850189 +Message-Id: <1500420688-11912-1-git-send-email-frowand.list@gmail.com> +To: Peter Chen , + Greg Kroah-Hartman , linux-usb@vger.kernel.org +Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org +Date: Tue, 18 Jul 2017 16:31:28 -0700 + +From: Frank Rowand + +Boot fails for qcom-apq8074-dragonboard on 4.13-rc1 with error: +OF: ERROR: Bad of_node_put() on /soc/usb@f9a55000 + +The error will occur if the configuration is set to: + CONFIG_OF_OVERLAY y + CONFIG_OF_UNITTEST y + CONFIG_OF_DYNAMIC y + CONFIG_OF_RESOLVE y + +If CONFIG_OF_DYNAMIC is enabled then of_node_release() detects an +attempt to release a node that is still attached to the device tree. + +Signed-off-by: Frank Rowand +--- + drivers/usb/chipidea/ci_hdrc_msm.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/usb/chipidea/ci_hdrc_msm.c b/drivers/usb/chipidea/ci_hdrc_msm.c +index 0bdfcdcbf7a5..bb626120296f 100644 +--- a/drivers/usb/chipidea/ci_hdrc_msm.c ++++ b/drivers/usb/chipidea/ci_hdrc_msm.c +@@ -251,7 +251,7 @@ static int ci_hdrc_msm_probe(struct platform_device *pdev) + if (ret) + goto err_mux; + +- ulpi_node = of_find_node_by_name(pdev->dev.of_node, "ulpi"); ++ ulpi_node = of_find_node_by_name(of_node_get(pdev->dev.of_node), "ulpi"); + if (ulpi_node) { + phy_node = of_get_next_available_child(ulpi_node, NULL); + ci->hsic = of_device_is_compatible(phy_node, "qcom,usb-hsic-phy");