Small error?? in IDE dma processing?
jason.harp@mail.ray.ca
Tue, 15 Dec 98 19:42:14 -0800
Mark or Andre,
Can you confirm an error in the following code for dma_intr(): (2.0)
dma_stat = inb(dma_base+2); /* get DMA status */
outb(inb(dma_base)&~1, dma_base); /* stop DMA operation */
stat = GET_STAT(); /* get drive status */
Should this not be:
outb(inb(dma_base)&~1, dma_base); /* stop DMA operation*/
dma_stat = inb(dma_base+2); /* get DMA status */
stat = GET_STAT(); /* get drive status */
Similar for (2.1) the DMA status is retrieve before you stop the DMA
operation.
Would the order not want to be as found in:
"Intel 82371FB (PIIX) and 82371SB (PIIX3) : PCI ISA IDE XCELERATOR"
document page 99. Where it states:
"7. In response to the interrupt, software resets the Start/Stop bit
in the command register. It then reads the controller status and then
the drive status to determine if the transfer completed successfully."
The ATA/ATAPI-4 spec T13-1153D Revision 17 30-Oct-97 page 234 would
seem to say the same.
Would you agree that this error (if it is) would account for a number
of IDE DMA issues seen in the last few weeks.
Jason Harp
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/