Renesas ARM SoC based marzen board fix for v3.10
Hi Arnd, Hi Olof,
please consider the following fix for v3.10.
It resolves a boot-failure regression on the marzen board.
The following changes since commit f722406faae2d073cc1d01063d1123c35425939e:
Linux 3.10-rc1 (2013-05-11 17:14:08 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas.git tags/renesas-boards-marzen-fixes-for-v3.10
for you to fetch changes up to 5f10428e4a6d99cc019270c51ad5a33fb38addeb:
ARM: shmobile: marzen: Use error values in usb_power_* (2013-05-22 15:43:16 +0900)
----------------------------------------------------------------
Correct USB PHY initialisation on the marzen board.
----------------------------------------------------------------
Simon Horman (1):
ARM: shmobile: marzen: Use error values in usb_power_*
arch/arm/mach-shmobile/board-marzen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
PATCH 1/1 ARM: shmobile: marzen: Use error values in usb_power_*
This patch updates the marzen board code as if USB PHY isn't enabled they phy will have a value set by ERR_PTR() rather than be NULL.
Without this patch a NULL pointer dereference and kernel panic occurs on initialisation of USB on marzen.
This resolves a regression introduced in 3.10-rc1 by b7fa5c2aec5be083eb2719b405089703608e9bc6
("usb: phy: return -ENXIO when PHY layer isn't enabled").
--- arch/arm/mach-shmobile/board-marzen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-shmobile/board-marzen.c +3 -3
@@ -212,8 +212,8 @@ static struct platform_device *marzen_devices[] __initdata = {static struct usb_phy *phy;static int usb_power_on (struct platform_device *pdev) { -if (!phy) -return -EIO ; +if (IS_ERR (phy)) +return PTR_ERR (phy);pm_runtime_enable (&pdev->dev);pm_runtime_get_sync (&pdev->dev);
@@ -225,7 +225,7 @@ static int usb_power_on(struct platform_device *pdev)static void usb_power_off (struct platform_device *pdev) { -if (!phy) +if (IS_ERR (phy))return ;usb_phy_shutdown (phy);
Signature · 1 line
1.8.2.1
PATCH 1/1 ARM: shmobile: marzen: Use error values in usb_power_*
Hello.
Quoted 21 lines · Simon Horman
This patch updates the marzen board code as if USB PHY isn't enabled they phy will have a value set by
ERR_PTR()rather than be NULL.Without this patch a NULL pointer dereference and kernel panic occurs on initialisation of USB on marzen.
This resolves a regression introduced in 3.10-rc1 by
b7fa5c2aec5be083eb2719b405089703608e9bc6
("usb: phy: return-ENXIOwhen PHY layer isn't enabled").Tested-by Nguyen Hong Ky <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/board-marzen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/mach-shmobile/board-marzen.c +0
-0
arch/arm/mach-shmobile/board-marzen.c static struct platform_device *marzen_devices[] __initdata = { · line 215
Quoted 6 lines
arch/arm/mach-shmobile/board-marzen.c +1
-2@@ -212,8 +212,8 @@ static struct platform_device *marzen_devices[] __initdata = {static struct usb_phy *phy;static int usb_power_on (struct platform_device *pdev) { -if (!phy) -return -EIO ; +if (IS_ERR (phy))
And even before the mentioned commit the right check should have
been IS_ERR_OR_NULL().
Thanks for finding/fixing this. Too bad I'll have to respin my USB patches now... :-)
WBR, Sergei
PATCH 1/1 ARM: shmobile: marzen: Use error values in usb_power_*
Quoted 20 lines · Sergei Shtylyov
Hello.
Quoted 16 lines · Simon Horman
This patch updates the marzen board code as if USB PHY isn't enabled they phy will have a value set by
ERR_PTR()rather than be NULL.Without this patch a NULL pointer dereference and kernel panic occurs on initialisation of USB on marzen.
This resolves a regression introduced in 3.10-rc1 by
b7fa5c2aec5be083eb2719b405089703608e9bc6
("usb: phy: return-ENXIOwhen PHY layer isn't enabled").Tested-by Nguyen Hong Ky <[email protected]>Signed-off-by Simon Horman <[email protected]>--- arch/arm/mach-shmobile/board-marzen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
Quoted 14 lines
arch/arm/mach-shmobile/board-marzen.c static struct platform_device *marzen_devices[] __initdata = { · line 215
Quoted 11 lines
arch/arm/mach-shmobile/board-marzen.c +1
-2@@ -212,8 +212,8 @@ static struct platform_device *marzen_devices[] __initdata = {static struct usb_phy *phy;static int usb_power_on (struct platform_device *pdev) { -if (!phy) -return -EIO ; +if (IS_ERR (phy))And even before the mentioned commit the right check should have
beenIS_ERR_OR_NULL().
Yes, quite true.
Quoted 10 lines
Thanks for finding/fixing this. Too bad I'll have to respin my USB patches now... :-)
WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html