ata_generic: implement ATA_GEN_* flags and force enable DMA on MBP 7,1
commit4d8712a629029881f096736ea7aebe57f2dde2e2
authorTejun Heo <tj@kernel.org>
Tue, 22 Jun 2010 10:27:26 +0000 (22 12:27 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:29:49 +0000 (2 10:29 -0700)
tree861b5d55c0899b73529dca5aa4f4e3cb106290a1
parenta651b8c1114dbe0cee885a787b204e2fabb27a01
ata_generic: implement ATA_GEN_* flags and force enable DMA on MBP 7,1

commit 1529c69adce1e95f7ae72f0441590c226bbac7fc upstream.

IDE mode of MCP89 on MBP 7,1 doesn't set DMA enable bits in the BMDMA
status register.  Make the following changes to work around the problem.

* Instead of using hard coded 1 in id->driver_data as class code
  match, use ATA_GEN_CLASS_MATCH and carry the matched id in
  host->private_data.

* Instead of matching PCI_VENDOR_ID_CENATEK, use ATA_GEN_FORCE_DMA
  flag in id instead.

* Add ATA_GEN_FORCE_DMA to the id entry of MBP 7,1.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Peer Chen <pchen@nvidia.com>
Reported-by: Anders Ă˜sthus <grapz666@gmail.com>
Reported-by: Andreas Graf <andreas_graf@csgraf.de>
Reported-by: Benoit Gschwind <gschwind@gnu-log.net>
Reported-by: Damien Cassou <damien.cassou@gmail.com>
Reported-by: tixetsal@juno.com
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/ata/ata_generic.c