[PATCH] usb: echi-hcd: Add ehci_setup check before echi_shutdown

Andy Gross andy.gross at linaro.org
Thu May 19 13:49:36 PDT 2016


On 19 May 2016 at 05:12, Srinivas Kandagatla
<srinivas.kandagatla at linaro.org> wrote:
> This patch protects system from crashing at shutdown in
> cases where usb host is not added yet from OTG controller driver.
> As ehci_setup() not done yet, so stop accessing registers or
> variables initialized as part of ehci_setup().
>
> The use case is simple, for boards like DB410c where the usb host
> or device functionality is decided based on the micro-usb cable
> presence. If the board boots up with micro-usb connected, the
> OTG driver like echi-msm would not add the usb host by default.
> However a system shutdown would go and access registers and
> uninitialized variables, resulting in below crash.

Works great.

Tested-by: Andy Gross <andy.gross at linaro.org>



More information about the linux-arm-kernel mailing list