• David Lanzendörfer's avatar
    mmc: sunxi: Lock fix · dd9b3803
    David Lanzendörfer authored
    1) Adding a comment in order to clarify the choice of the locks within
    sunxi_mmc_handle_manual_stop
    
    2) As <lixiang@allwinnertech.com> has pointed out the wait_dma variable
    was not accessed within the spin lock block in sunxi_mmc_request and so
    (even if it should never happend) it would have theoretically been
    possible that some other function would access the variable at the same
    time as the function. This has been changed now and the function is
    using local variables outside the lock and copys the value over during
    the lock phase.
    Signed-off-by: default avatarDavid Lanzendörfer <david.lanzendoerfer@o2s.ch>
    Reported-by: <lixiang@allwinnertech.com>
    Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
    dd9b3803
sunxi-mmc.c 28.5 KB