The ecspi controller is supposed to support burst length of 1 to 4096 bits, meaning it is possible to configure it to use a value that isn't a multiple of 8 (to my understanding). In that case, since tx_burst is always decremented by 8, it will underflow. Sorry I didn't include an explanation. Should I resubmit the patch?
> > > DPRINTF("writing 0x%02x\n", (uint32_t)byte); > > @@ -206,7 +206,7 @@ static void imx_spi_flush_txfifo(IMXSPIState *s) > > if (fifo32_is_full(&s->rx_fifo)) { > > s->regs[ECSPI_STATREG] |= ECSPI_STATREG_RO; > > } else { > > - fifo32_push(&s->rx_fifo, (uint8_t)rx); > > + fifo32_push(&s->rx_fifo, rx); > > } > > > > if (s->burst_length <= 0) { > > This seems like a separate change to the first one; > in general unrelated changes should be each in their > own patch, rather than combined into a single patch. Should I resubmit this as a patch? > > The fifo32_push() part of this change looks correct to me. > > thanks > -- PMM >