pata_bf54x: fix BMIDE status register emulation
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Fri, 6 Jan 2012 17:45:45 +0000 (20:45 +0300)
committerJeff Garzik <jgarzik@redhat.com>
Mon, 9 Jan 2012 00:24:02 +0000 (19:24 -0500)
commit909fefc2511120ec71178f752c195c7b0b30269e
tree706b2981d230533e135ba6d431b8922a81a302e4
parent33574d68ae41ccbc6686cfabd965c685285c58a0
pata_bf54x: fix BMIDE status register emulation

The author of this driver clearly wasn't familiar with the BMIDE specification
(also known as SFF-8038i) when he implemented the bmdma_status() method: first,
the interrupt bit of the BMIDE status register corresponds to nothing else but
INTRQ signal (ATAPI_DEV_INT here); second, the error bit is only set if the
controller encounters issue doing the bus master transfers, not on the IDE DMA
burst termination interrupts like here (moreover, setting the error bit doesn't
cause an interrupt).  We now need to disable all those unused interrupts...

(The only thing I couldn't figure out is how to flush the FIFO to memory once
the interrupt happens as required by the mentioned spec.)

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/pata_bf54x.c