Skip to content
  • Christian Gmeiner's avatar
    spi: imx: wait_for_completion_timeout(..) for PIO transfers · ff1ba3da
    Christian Gmeiner authored
    In some rare cases I see the following 'task blocked' information. It
    looks like the PIO transfer has some problems and never succeeds. Make
    use of wait_for_completion_timeout(..) to detect this case and
    return -ETIMEDOUT.
    
    [ 240.246067] INFO: task hexdump:1660 blocked for more than 120 seconds.
    [ 240.246089] Not tainted 4.1.17 0000001
    [ 240.246099] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
    [ 240.246109] hexdump D c0575548 0 1660 1 0x00000000
    [ 240.246132] Backtrace:
    [ 240.246166] [<c057524c>] (__schedule) from [<c0575a84>] (schedule+0x40/0xa4)
    [ 240.246176] r10:00000000 r9:c07f1300 r8:c07b8408 r7:c0576518 r6:7fffffff r5:7fffffff
    [ 240.246210] r4:ee972e7c
    [ 240.246233] [<c0575a44>] (schedule) from [<c0578544>] (schedule_timeout+0x174/0x274)
    [ 240.246254] [<c05783d0>] (schedule_timeout) from [<c0576518>] (wait_for_common+0xc0/0x164)
    [ 240.246263] r10:00000000 r9:c07f1300 r8:00000002 r7:00000000 r6:7fffffff r5:ee972e...
    ff1ba3da