27bbd0d3ef
In our idle loop, use an or instruction to set PRELOADEN rather than rewriting the contents of DMAPARAMS to DFCNTRL. The later may re-enable the DMA engine if the idle loop is called to complete the preload of at least one segment when a target disconnects on an S/G segment boundary but before we have completed fetching the next segment. This correts a hang, usually in message out phase, when this situation occurs. This bug has been here for a long time, so the situation is rare, but not impossible to reproduce. It only affected Ultra2/U160 controllers. Correct a few comments. Extra Sanity. Make sure that SCSIEN is also turned off, along with HDMAEN, at the end of the data phase.