sata_nv: don't use legacy DMA in ADMA mode (v3)
authorRobert Hancock <hancockr@shaw.ca>
Sun, 25 Nov 2007 22:59:36 +0000 (16:59 -0600)
committerJeff Garzik <jeff@garzik.org>
Tue, 4 Dec 2007 19:01:18 +0000 (14:01 -0500)
commit3f3debdbfb7713aa06c4370bab6bef277dfd7a37
tree0f69f5b993db5e7ec188383f082079396975cd18
parent2254c2e0184c603f92fc9b81016ff4bb53da622d
sata_nv: don't use legacy DMA in ADMA mode (v3)

We need to run any DMA command with result taskfile requested in ADMA mode
when the port is in ADMA mode, otherwise it may try to use the legacy DMA engine
in ADMA mode which is not allowed. Enforce this with BUG_ON() since data
corruption could potentially result if this happened. Also, fail any attempt to
try and issue NCQ commands with result taskfile requested, since the hardware
doesn't allow this.

Signed-off-by: Robert Hancock <hancockr@shaw.ca>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/ata/sata_nv.c