lkml.org 
[lkml]   [2014]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.16 147/357] usb: dwc2/gadget: delay enabling irq once hardware is configured properly
    Date
    3.16-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Marek Szyprowski <m.szyprowski@samsung.com>

    commit eb3c56c5ccdd252940cb0ec0541fcdc94894bd8d upstream.

    This patch fixes kernel panic/interrupt storm/etc issues if bootloader
    left s3c-hsotg module in enabled state. Now interrupt handler is enabled
    only after proper configuration of hardware registers.

    Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
    Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/usb/dwc2/gadget.c | 18 +++++++++++-------
    1 file changed, 11 insertions(+), 7 deletions(-)

    --- a/drivers/usb/dwc2/gadget.c
    +++ b/drivers/usb/dwc2/gadget.c
    @@ -3444,13 +3444,6 @@ static int s3c_hsotg_probe(struct platfo

    hsotg->irq = ret;

    - ret = devm_request_irq(&pdev->dev, hsotg->irq, s3c_hsotg_irq, 0,
    - dev_name(dev), hsotg);
    - if (ret < 0) {
    - dev_err(dev, "cannot claim IRQ\n");
    - goto err_clk;
    - }
    -
    dev_info(dev, "regs %p, irq %d\n", hsotg->regs, hsotg->irq);

    hsotg->gadget.max_speed = USB_SPEED_HIGH;
    @@ -3498,6 +3491,17 @@ static int s3c_hsotg_probe(struct platfo
    s3c_hsotg_init(hsotg);
    s3c_hsotg_hw_cfg(hsotg);

    + ret = devm_request_irq(&pdev->dev, hsotg->irq, s3c_hsotg_irq, 0,
    + dev_name(dev), hsotg);
    + if (ret < 0) {
    + s3c_hsotg_phy_disable(hsotg);
    + clk_disable_unprepare(hsotg->clk);
    + regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies),
    + hsotg->supplies);
    + dev_err(dev, "cannot claim IRQ\n");
    + goto err_clk;
    + }
    +
    /* hsotg->num_of_eps holds number of EPs other than ep0 */

    if (hsotg->num_of_eps == 0) {



    \
     
     \ /
      Last update: 2014-10-04 03:21    [W:4.117 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site