Factor out fifoflush() in a separate func
Factor out fifoflush() in a separate func

Also flush the fifo for stalled transfers

cmotc/ratox,insanity54/batox,pranomostro/ratox,kytvi2p/ratox,cmotc/ratox,pranomostro/ratox