Commit 72fec808 authored by Tejun Heo's avatar Tejun Heo Committed by Chris Wright

[PATCH] ahci: disable 64bit dma on sb600

SB600 claims it can do 64bit DMA but it can't.  Disable it.
Signed-off-by: default avatarTejun Heo <htejun@gmail.com>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1fafdb23
...@@ -170,6 +170,7 @@ enum { ...@@ -170,6 +170,7 @@ enum {
AHCI_FLAG_IGN_IRQ_IF_ERR = (1 << 25), /* ignore IRQ_IF_ERR */ AHCI_FLAG_IGN_IRQ_IF_ERR = (1 << 25), /* ignore IRQ_IF_ERR */
AHCI_FLAG_HONOR_PI = (1 << 26), /* honor PORTS_IMPL */ AHCI_FLAG_HONOR_PI = (1 << 26), /* honor PORTS_IMPL */
AHCI_FLAG_IGN_SERR_INTERNAL = (1 << 27), /* ignore SERR_INTERNAL */ AHCI_FLAG_IGN_SERR_INTERNAL = (1 << 27), /* ignore SERR_INTERNAL */
AHCI_FLAG_32BIT_ONLY = (1 << 28), /* force 32bit */
}; };
struct ahci_cmd_hdr { struct ahci_cmd_hdr {
...@@ -370,7 +371,8 @@ static const struct ata_port_info ahci_port_info[] = { ...@@ -370,7 +371,8 @@ static const struct ata_port_info ahci_port_info[] = {
.flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY | .flags = ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA | ATA_FLAG_MMIO | ATA_FLAG_PIO_DMA |
ATA_FLAG_SKIP_D2H_BSY | ATA_FLAG_SKIP_D2H_BSY |
AHCI_FLAG_IGN_SERR_INTERNAL, AHCI_FLAG_IGN_SERR_INTERNAL |
AHCI_FLAG_32BIT_ONLY,
.pio_mask = 0x1f, /* pio0-4 */ .pio_mask = 0x1f, /* pio0-4 */
.udma_mask = 0x7f, /* udma0-6 ; FIXME */ .udma_mask = 0x7f, /* udma0-6 ; FIXME */
.port_ops = &ahci_ops, .port_ops = &ahci_ops,
...@@ -1579,6 +1581,12 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent) ...@@ -1579,6 +1581,12 @@ static int ahci_host_init(struct ata_probe_ent *probe_ent)
probe_ent->n_ports = cap_n_ports; probe_ent->n_ports = cap_n_ports;
using_dac = hpriv->cap & HOST_CAP_64; using_dac = hpriv->cap & HOST_CAP_64;
if (using_dac && (probe_ent->port_flags & AHCI_FLAG_32BIT_ONLY)) {
dev_printk(KERN_INFO, &pdev->dev,
"controller can't do 64bit DMA, forcing 32bit\n");
using_dac = 0;
}
if (using_dac && if (using_dac &&
!pci_set_dma_mask(pdev, DMA_64BIT_MASK)) { !pci_set_dma_mask(pdev, DMA_64BIT_MASK)) {
rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK); rc = pci_set_consistent_dma_mask(pdev, DMA_64BIT_MASK);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment