aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-08-09 17:19:34 -0400
committerJeff Garzik <jeff@garzik.org>2007-08-15 04:17:14 -0400
commitbe456b77ffbd3983b5da8eff49a70a701333f68b (patch)
tree519f8acc8d443de150972b7563443bfada168d97 /drivers/ata
parentac2b04371fffd964b0d1c3369a9972bed7a5c5d9 (diff)
pata_artop: fix UDMA5 for AEC6280[R] and UDMA6 for AEC6880[R]
Maximum supported UDMA mode for AEC6280[R] is UDMA5 (not UDMA4) and for AEC6880[R] it is UDMA6 (not UDMA5): * Fix the problem by adding missing struct ata_port_info to artop_init_one(). * Use the right naming (s/626/628/). * Bump driver version. Fixes IDE->libata regression, problem was never present in IDE aec62xx driver. Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/pata_artop.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c
index ce589d96ca42..b5352ebecef9 100644
--- a/drivers/ata/pata_artop.c
+++ b/drivers/ata/pata_artop.c
@@ -2,6 +2,7 @@
2 * pata_artop.c - ARTOP ATA controller driver 2 * pata_artop.c - ARTOP ATA controller driver
3 * 3 *
4 * (C) 2006 Red Hat <alan@redhat.com> 4 * (C) 2006 Red Hat <alan@redhat.com>
5 * (C) 2007 Bartlomiej Zolnierkiewicz
5 * 6 *
6 * Based in part on drivers/ide/pci/aec62xx.c 7 * Based in part on drivers/ide/pci/aec62xx.c
7 * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org> 8 * Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org>
@@ -28,7 +29,7 @@
28#include <linux/ata.h> 29#include <linux/ata.h>
29 30
30#define DRV_NAME "pata_artop" 31#define DRV_NAME "pata_artop"
31#define DRV_VERSION "0.4.3" 32#define DRV_VERSION "0.4.4"
32 33
33/* 34/*
34 * The ARTOP has 33 Mhz and "over clocked" timing tables. Until we 35 * The ARTOP has 33 Mhz and "over clocked" timing tables. Until we
@@ -430,7 +431,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
430 .udma_mask = ATA_UDMA4, 431 .udma_mask = ATA_UDMA4,
431 .port_ops = &artop6260_ops, 432 .port_ops = &artop6260_ops,
432 }; 433 };
433 static const struct ata_port_info info_626x_fast = { 434 static const struct ata_port_info info_628x = {
434 .sht = &artop_sht, 435 .sht = &artop_sht,
435 .flags = ATA_FLAG_SLAVE_POSS, 436 .flags = ATA_FLAG_SLAVE_POSS,
436 .pio_mask = 0x1f, /* pio0-4 */ 437 .pio_mask = 0x1f, /* pio0-4 */
@@ -438,6 +439,14 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
438 .udma_mask = ATA_UDMA5, 439 .udma_mask = ATA_UDMA5,
439 .port_ops = &artop6260_ops, 440 .port_ops = &artop6260_ops,
440 }; 441 };
442 static const struct ata_port_info info_628x_fast = {
443 .sht = &artop_sht,
444 .flags = ATA_FLAG_SLAVE_POSS,
445 .pio_mask = 0x1f, /* pio0-4 */
446 .mwdma_mask = 0x07, /* mwdma0-2 */
447 .udma_mask = ATA_UDMA6,
448 .port_ops = &artop6260_ops,
449 };
441 const struct ata_port_info *ppi[] = { NULL, NULL }; 450 const struct ata_port_info *ppi[] = { NULL, NULL };
442 451
443 if (!printed_version++) 452 if (!printed_version++)
@@ -455,13 +464,13 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
455 } 464 }
456 else if (id->driver_data == 1) /* 6260 */ 465 else if (id->driver_data == 1) /* 6260 */
457 ppi[0] = &info_626x; 466 ppi[0] = &info_626x;
458 else if (id->driver_data == 2) { /* 6260 or 6260 + fast */ 467 else if (id->driver_data == 2) { /* 6280 or 6280 + fast */
459 unsigned long io = pci_resource_start(pdev, 4); 468 unsigned long io = pci_resource_start(pdev, 4);
460 u8 reg; 469 u8 reg;
461 470
462 ppi[0] = &info_626x; 471 ppi[0] = &info_628x;
463 if (inb(io) & 0x10) 472 if (inb(io) & 0x10)
464 ppi[0] = &info_626x_fast; 473 ppi[0] = &info_628x_fast;
465 /* Mac systems come up with some registers not set as we 474 /* Mac systems come up with some registers not set as we
466 will need them */ 475 will need them */
467 476