On Tue, Nov 21, 2017 at 10:09:02AM +0100, Ricardo Ribalda Delgado wrote: > + stalled = 10; > while (rx_words) { > + if (rx_words == n_words && !(stalled--) && > + !(sr & XSPI_SR_TX_EMPTY_MASK) && > + (sr & XSPI_SR_RX_EMPTY_MASK)) { 10 seems like a small number for what is essentially just a busy spin - are we sure that we won't reasonably hit a case where the CPU is sufficiently fast and the bus sufficiently slow we falsely detect a stall? Where did this number come from?