Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Wi-Fi stall issues #31

Merged
merged 1 commit into from
Jun 24, 2015
Merged

Resolve Wi-Fi stall issues #31

merged 1 commit into from
Jun 24, 2015

Commits on Jun 24, 2015

  1. mmc: jz47xx: Fix race condition in IRQ mask update

    A spinlock is held while updating the internal copy of the IRQ mask,
    but not while writing it to the actual IMASK register. After the lock
    is released, an IRQ can occur before the IMASK register is written.
    If handling this IRQ causes the mask to be changed, when the handler
    returns back to the middle of the first mask update, a stale value
    will be written to the mask register.
    
    If this causes an IRQ to become unmasked that cannot have its status
    cleared by writing a 1 to it in the IFLG register, e.g. the SDIO IRQ,
    then we can end up stuck with the same IRQ repeatedly being fired but
    not handled. Normally the MMC IRQ handler attempts to clear any
    unexpected IRQs by writing IFLG, but for those that cannot be cleared
    in this way then the IRQ will just repeatedly fire.
    
    This was resulting in lockups after a while of using Wi-Fi on the
    CI20 (GitHub issue #19).
    
    Resolve by holding the spinlock until after the IMASK register has
    been updated.
    
    Signed-off-by: Alex Smith <alex.smith@imgtec.com>
    Alex Smith committed Jun 24, 2015
    Configuration menu
    Copy the full SHA
    81065c3 View commit details
    Browse the repository at this point in the history