lkml.org 
[lkml]   [2014]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.13 085/151] mfd: kempld-core: Fix potential hang-up during boot
    Date
    3.13.11.1 -stable review patch.  If anyone has any objections, please let me know.

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

    From: Guenter Roeck <linux@roeck-us.net>

    commit 204747c970c0d568721c76ab8a57dde0e5dcf0d5 upstream.

    On PXT and COMe-cPC2 boards it is observed that the hardware
    mutex is acquired but not being released during initialization.
    This can result in a hang-up during boot if the driver is built
    into the kernel.

    Releasing the mutex twice if it was acquired fixes the problem.
    Subsequent request/release cycles work as expected, so the fix is
    only needed during initialization.

    Reviewed-by: Michael Brunner <michael.brunner@kontron.com>
    Tested-by: Michael Brunner <michael.brunner@kontron.com>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    drivers/mfd/kempld-core.c | 7 +++++--
    1 file changed, 5 insertions(+), 2 deletions(-)

    diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c
    index d3e2327..38917a8 100644
    --- a/drivers/mfd/kempld-core.c
    +++ b/drivers/mfd/kempld-core.c
    @@ -322,9 +322,12 @@ static int kempld_detect_device(struct kempld_device_data *pld)
    return -ENODEV;
    }

    - /* Release hardware mutex if aquired */
    - if (!(index_reg & KEMPLD_MUTEX_KEY))
    + /* Release hardware mutex if acquired */
    + if (!(index_reg & KEMPLD_MUTEX_KEY)) {
    iowrite8(KEMPLD_MUTEX_KEY, pld->io_index);
    + /* PXT and COMe-cPC2 boards may require a second release */
    + iowrite8(KEMPLD_MUTEX_KEY, pld->io_index);
    + }

    mutex_unlock(&pld->lock);

    --
    1.9.1


    \
     
     \ /
      Last update: 2014-05-02 18:41    [W:3.123 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site