pata_cmd64x: implement serialization as per notes
authorAlan Cox <alan@linux.intel.com>
Mon, 30 Nov 2009 13:22:54 +0000 (13:22 +0000)
committerJeff Garzik <jgarzik@redhat.com>
Thu, 3 Dec 2009 07:46:36 +0000 (02:46 -0500)
commitd43744390e460dce6626fb8de2c02a24ff650005
treedef287ec85fa9d1a2cfc70633892b158cef509b4
parentf20941f334d8fdb6b598658979709b4e94cd034b
pata_cmd64x: implement serialization as per notes

Daniela Engert pointed out that there are some implementation notes for the
643 and 646 that deal with certain serialization rules. In theory we don't
need them because they apply when the motherboard decides not to retry PCI
requests for long enough and the chip is busy doing a DMA transfer on the
other channel.

The rule basically is "don't touch the taskfile of the other channel while
a DMA is in progress". To implement that we need to

- not issue a command on a channel when there is a DMA command queued
- not issue a DMA command on a channel when there are PIO commands queued
- use the alternative access to the interrupt source so that we do not
  touch altstatus or status on shared IRQ.

Updated to remote extra conditional check Bartlomiej noted and to remove
the variables for irq checks as the CMD648 doesn't have the underlying problem.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/pata_cmd64x.c