• S
    mmc: msm_sdcc: Reduce command timeouts and improve reliability. · 56a8b5b8
    San Mehat 提交于
    Based on an original patch by Brent DeGraaf:
    
    "Previous versions of the SD driver were beset with excessive command
    timeouts. These timeouts were silent by default, but happened
    frequently, especially during heavy system activity and concurrent
    access of two or more SD devices. Worst case, these timeouts would
    occasionally hit at the end of a successful write, resulting in false
    failures that could adversely affect journaling file systems if timing
    was unfortunate. This update tightens the association and timing between
    dma transfers and the commands that trigger them by utilizing a new api
    implemented in the datamover.  In addition, it also fixes a dma cache
    coherency issue that was exposed during testing of this fix that
    occasionally resulted in card corruption.  Processing of results in the
    interrupt status routine was modified to process command results prior to
    data because overwritten command results were observed during testing
    since the data section can result in command issuances of its own.
    This change also eliminates the software command timeout, relying entirely
    on the hardware version, since the software timeout was found to cause
    problems of its own after extensive testing (having hardware timer and
    software timers addressing the same issue was found to cause a race
    condition under heavy system load)."
    
    This change originally added PROG_DONE handling, which has been split out
    into a separate patch. Also on our platform, the data mover driver maintains
    coherency to ensure API reliability, so the above mentioned cache corruption
    issue was not an issue for us.
    Signed-off-by: NSan Mehat <san@google.com>
    Cc: Brian Swetland <swetland@google.com>
    
    Change-Id: Ifbf17cfafb858106d73bf49af52b5161a265a484
    Signed-off-by: NSan Mehat <san@google.com>
    Signed-off-by: NDaniel Walker <dwalker@codeaurora.org>
    56a8b5b8
msm_sdcc.c 32.6 KB