• Cindy H Kao's avatar
    wimax/i2400m: fix the bootmode RX deadlock in SDIO driver · 5b45bfe5
    Cindy H Kao authored
    i2400ms_bus_bm_wait_for_ack() causes a race condition. It happens
    because this function clears i2400ms->bm_ack_size before waiting for
    an interrupt, which is set by the interrupt service routine i2400ms_rx()
    to indicate reception and size of received data; thus, if the interrupt
    came right before the clearing/waiting, it is lost.
    
    The fix is clear the bm_ack_size to -EINPROGRESS before we are enabling
    the RX interrupt configuration in i2400ms_rx_setup(). Then everytime
    when the interrupt service routine i2400ms_rx() is invoked during bootmode,
    bm_ack_size is updated with the actual rx_size and it is cleared to
    -EINPROGRESS again after the RX data is handled.
    Signed-off-by: default avatarCindy H Kao <cindy.h.kao@intel.com>
    Signed-off-by: default avatarInaky Perez-Gonzalez <inaky@linux.intel.com>
    5b45bfe5
sdio-fw.c 7.02 KB