diff options
author | Tejun Heo <htejun@gmail.com> | 2007-05-18 10:23:19 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-05-21 20:00:25 -0400 |
commit | c7a42156d99bcea7f8173ba7a6034bbaa2ecb77c (patch) | |
tree | 7d84ead0d69602cc900e30355ec84132800dea93 | |
parent | 55b637c6a003a8c4850b41a2c2fd6942d8a7f530 (diff) |
ahci: disable 64bit dma on sb600
SB600 claims it can do 64bit DMA but it can't. Disable it.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/ata/ahci.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index e00e1b913d28..bb940475d87c 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -170,6 +170,7 @@ enum { | |||
170 | AHCI_FLAG_IGN_IRQ_IF_ERR = (1 << 25), /* ignore IRQ_IF_ERR */ | 170 | AHCI_FLAG_IGN_IRQ_IF_ERR = (1 << 25), /* ignore IRQ_IF_ERR */ |
171 | AHCI_FLAG_HONOR_PI = (1 << 26), /* honor PORTS_IMPL */ | 171 | AHCI_FLAG_HONOR_PI = (1 << 26), /* honor PORTS_IMPL */ |
172 | AHCI_FLAG_IGN_SERR_INTERNAL = (1 << 27), /* ignore SERR_INTERNAL */ | 172 | AHCI_FLAG_IGN_SERR_INTERNAL = (1 << 27), /* ignore SERR_INTERNAL */ |
173 | AHCI_FLAG_32BIT_ONLY = (1 << 28), /* force 32bit */ | ||
173 | 174 | ||
174 | AHCI_FLAG_COMMON = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | | 175 | AHCI_FLAG_COMMON = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | |
175 | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | | 176 | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | |
@@ -354,7 +355,8 @@ static const struct ata_port_info ahci_port_info[] = { | |||
354 | /* board_ahci_sb600 */ | 355 | /* board_ahci_sb600 */ |
355 | { | 356 | { |
356 | .flags = AHCI_FLAG_COMMON | | 357 | .flags = AHCI_FLAG_COMMON | |
357 | AHCI_FLAG_IGN_SERR_INTERNAL, | 358 | AHCI_FLAG_IGN_SERR_INTERNAL | |
359 | AHCI_FLAG_32BIT_ONLY, | ||
358 | .pio_mask = 0x1f, /* pio0-4 */ | 360 | .pio_mask = 0x1f, /* pio0-4 */ |
359 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ | 361 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ |
360 | .port_ops = &ahci_ops, | 362 | .port_ops = &ahci_ops, |
@@ -492,6 +494,13 @@ static void ahci_save_initial_config(struct pci_dev *pdev, | |||
492 | hpriv->saved_cap = cap = readl(mmio + HOST_CAP); | 494 | hpriv->saved_cap = cap = readl(mmio + HOST_CAP); |
493 | hpriv->saved_port_map = port_map = readl(mmio + HOST_PORTS_IMPL); | 495 | hpriv->saved_port_map = port_map = readl(mmio + HOST_PORTS_IMPL); |
494 | 496 | ||
497 | /* some chips lie about 64bit support */ | ||
498 | if ((cap & HOST_CAP_64) && (pi->flags & AHCI_FLAG_32BIT_ONLY)) { | ||
499 | dev_printk(KERN_INFO, &pdev->dev, | ||
500 | "controller can't do 64bit DMA, forcing 32bit\n"); | ||
501 | cap &= ~HOST_CAP_64; | ||
502 | } | ||
503 | |||
495 | /* fixup zero port_map */ | 504 | /* fixup zero port_map */ |
496 | if (!port_map) { | 505 | if (!port_map) { |
497 | port_map = (1 << ahci_nr_ports(hpriv->cap)) - 1; | 506 | port_map = (1 << ahci_nr_ports(hpriv->cap)) - 1; |