diff options
author | Peter Robinson <pbrobinson@gmail.com> | 2017-11-12 17:53:42 +0000 |
---|---|---|
committer | Peter Robinson <pbrobinson@gmail.com> | 2017-11-12 17:53:42 +0000 |
commit | ffd0c6f9f3b8cb2bb14f46a82e6d009814a7a1a3 (patch) | |
tree | 783eea311c785bc1550c7eeffbca9dfefc8c787c | |
parent | 8348394cdc6535c8aa209f0a63144fe3eb8c7960 (diff) | |
download | kernel-ffd0c6f9f3b8cb2bb14f46a82e6d009814a7a1a3.tar.gz kernel-ffd0c6f9f3b8cb2bb14f46a82e6d009814a7a1a3.tar.xz kernel-ffd0c6f9f3b8cb2bb14f46a82e6d009814a7a1a3.zip |
Add patch to fix issue with ULPI on QCom devices
-rw-r--r-- | USB-ulpi-fix-bus-node-lookup.patch | 48 | ||||
-rw-r--r-- | kernel.spec | 12 |
2 files changed, 50 insertions, 10 deletions
diff --git a/USB-ulpi-fix-bus-node-lookup.patch b/USB-ulpi-fix-bus-node-lookup.patch new file mode 100644 index 000000000..835cf2ab6 --- /dev/null +++ b/USB-ulpi-fix-bus-node-lookup.patch @@ -0,0 +1,48 @@ +From patchwork Sat Nov 11 15:31:18 2017 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: USB: ulpi: fix bus-node lookup +From: Johan Hovold <johan@kernel.org> +X-Patchwork-Id: 10054387 +Message-Id: <20171111153118.16038-1-johan@kernel.org> +To: Heikki Krogerus <heikki.krogerus@linux.intel.com> +Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, + linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, + linux-arm-msm@vger.kernel.org, Rob Clark <robdclark@gmail.com>, + Peter Robinson <pbrobinson@gmail.com>, Johan Hovold <johan@kernel.org>, + stable <stable@vger.kernel.org> +Date: Sat, 11 Nov 2017 16:31:18 +0100 + +Fix bus-node lookup during registration, which ended up searching the whole +device tree depth-first starting at the parent (or grand parent) rather +than just matching on its children. + +To make things worse, the parent (or grand-parent) node could end being +prematurely freed as well. + +Fixes: ef6a7bcfb01c ("usb: ulpi: Support device discovery via DT") +Reported-by: Peter Robinson <pbrobinson@gmail.com> +Reported-by: Stephen Boyd <sboyd@codeaurora.org> +Cc: stable <stable@vger.kernel.org> # 4.10 +Signed-off-by: Johan Hovold <johan@kernel.org> +--- + drivers/usb/common/ulpi.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c +index 8b351444cc40..9a2ab6751a23 100644 +--- a/drivers/usb/common/ulpi.c ++++ b/drivers/usb/common/ulpi.c +@@ -180,9 +180,9 @@ static int ulpi_of_register(struct ulpi *ulpi) + /* Find a ulpi bus underneath the parent or the grandparent */ + parent = ulpi->dev.parent; + if (parent->of_node) +- np = of_find_node_by_name(parent->of_node, "ulpi"); ++ np = of_get_child_by_name(parent->of_node, "ulpi"); + else if (parent->parent && parent->parent->of_node) +- np = of_find_node_by_name(parent->parent->of_node, "ulpi"); ++ np = of_get_child_by_name(parent->parent->of_node, "ulpi"); + if (!np) + return 0; + diff --git a/kernel.spec b/kernel.spec index df592d905..8bb1a1703 100644 --- a/kernel.spec +++ b/kernel.spec @@ -598,24 +598,16 @@ Patch305: arm-imx6-hummingboard2.patch Patch306: arm64-Add-option-of-13-for-FORCE_MAX_ZONEORDER.patch -# https://patchwork.kernel.org/patch/9967397/ - -# https://patchwork.kernel.org/patch/9815555/ -# https://patchwork.kernel.org/patch/9815651/ -# https://patchwork.kernel.org/patch/9819885/ # https://patchwork.kernel.org/patch/9820417/ -# https://patchwork.kernel.org/patch/9821151/ -# https://patchwork.kernel.org/patch/9821157/ Patch310: qcom-msm89xx-fixes.patch -# https://patchwork.kernel.org/patch/9831825/ -# https://patchwork.kernel.org/patch/9833721/ +# https://patchwork.kernel.org/patch/10054387/ +Patch311: USB-ulpi-fix-bus-node-lookup.patch # Fix USB on the RPi https://patchwork.kernel.org/patch/9879371/ Patch321: bcm283x-dma-mapping-skip-USB-devices-when-configuring-DMA-during-probe.patch # bcm2837 bluetooth support -# Patch323: bcm2837-bluetooth-support.patch # Generic fixes and enablement for Socionext SoC and 96board |