diff options
author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-31 00:57:05 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-31 00:57:05 -0400 |
commit | 5bc65793cbf8da0d35f19ef025dda22887e79e80 (patch) | |
tree | 8291998abd73055de6f487fafa174ee2a5d3afee /drivers/ata/ahci.c | |
parent | 6edae708bf77e012d855a7e2c7766f211d234f4f (diff) | |
parent | 3f0a6766e0cc5a577805732e5adb50a585c58175 (diff) |
[SCSI] Merge up to linux-2.6 head
Conflicts:
drivers/scsi/jazz_esp.c
Same changes made by both SCSI and SPARC trees: problem with UTF-8
conversion in the copyright.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/ata/ahci.c')
-rw-r--r-- | drivers/ata/ahci.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 1ae443d7ab92..7baeaffefe7a 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include <linux/libata.h> | 46 | #include <linux/libata.h> |
47 | 47 | ||
48 | #define DRV_NAME "ahci" | 48 | #define DRV_NAME "ahci" |
49 | #define DRV_VERSION "2.1" | 49 | #define DRV_VERSION "2.2" |
50 | 50 | ||
51 | 51 | ||
52 | enum { | 52 | enum { |
@@ -170,10 +170,12 @@ 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 | |
176 | ATA_FLAG_SKIP_D2H_BSY, | 177 | ATA_FLAG_SKIP_D2H_BSY | |
178 | ATA_FLAG_ACPI_SATA, | ||
177 | }; | 179 | }; |
178 | 180 | ||
179 | struct ahci_cmd_hdr { | 181 | struct ahci_cmd_hdr { |
@@ -353,7 +355,8 @@ static const struct ata_port_info ahci_port_info[] = { | |||
353 | /* board_ahci_sb600 */ | 355 | /* board_ahci_sb600 */ |
354 | { | 356 | { |
355 | .flags = AHCI_FLAG_COMMON | | 357 | .flags = AHCI_FLAG_COMMON | |
356 | AHCI_FLAG_IGN_SERR_INTERNAL, | 358 | AHCI_FLAG_IGN_SERR_INTERNAL | |
359 | AHCI_FLAG_32BIT_ONLY, | ||
357 | .pio_mask = 0x1f, /* pio0-4 */ | 360 | .pio_mask = 0x1f, /* pio0-4 */ |
358 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ | 361 | .udma_mask = 0x7f, /* udma0-6 ; FIXME */ |
359 | .port_ops = &ahci_ops, | 362 | .port_ops = &ahci_ops, |
@@ -491,6 +494,13 @@ static void ahci_save_initial_config(struct pci_dev *pdev, | |||
491 | hpriv->saved_cap = cap = readl(mmio + HOST_CAP); | 494 | hpriv->saved_cap = cap = readl(mmio + HOST_CAP); |
492 | hpriv->saved_port_map = port_map = readl(mmio + HOST_PORTS_IMPL); | 495 | hpriv->saved_port_map = port_map = readl(mmio + HOST_PORTS_IMPL); |
493 | 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 | |||
494 | /* fixup zero port_map */ | 504 | /* fixup zero port_map */ |
495 | if (!port_map) { | 505 | if (!port_map) { |
496 | port_map = (1 << ahci_nr_ports(hpriv->cap)) - 1; | 506 | port_map = (1 << ahci_nr_ports(hpriv->cap)) - 1; |