aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_promise.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_promise.c')
-rw-r--r--drivers/ata/sata_promise.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c
index f56549b90aa6..3a7d9b5332af 100644
--- a/drivers/ata/sata_promise.c
+++ b/drivers/ata/sata_promise.c
@@ -45,7 +45,7 @@
45#include "sata_promise.h" 45#include "sata_promise.h"
46 46
47#define DRV_NAME "sata_promise" 47#define DRV_NAME "sata_promise"
48#define DRV_VERSION "2.05" 48#define DRV_VERSION "2.07"
49 49
50 50
51enum { 51enum {
@@ -653,6 +653,8 @@ static void pdc_error_intr(struct ata_port *ap, struct ata_queued_cmd *qc,
653 qc->err_mask |= ac_err_mask; 653 qc->err_mask |= ac_err_mask;
654 654
655 pdc_reset_port(ap); 655 pdc_reset_port(ap);
656
657 ata_port_abort(ap);
656} 658}
657 659
658static inline unsigned int pdc_host_intr( struct ata_port *ap, 660static inline unsigned int pdc_host_intr( struct ata_port *ap,
@@ -924,6 +926,7 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
924 struct ata_host *host; 926 struct ata_host *host;
925 void __iomem *base; 927 void __iomem *base;
926 int n_ports, i, rc; 928 int n_ports, i, rc;
929 int is_sataii_tx4;
927 930
928 if (!printed_version++) 931 if (!printed_version++)
929 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); 932 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
@@ -962,10 +965,23 @@ static int pdc_ata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
962 } 965 }
963 host->iomap = pcim_iomap_table(pdev); 966 host->iomap = pcim_iomap_table(pdev);
964 967
965 for (i = 0; i < host->n_ports; i++) 968 is_sataii_tx4 = 0;
969 if ((pi->flags & (PDC_FLAG_GEN_II|PDC_FLAG_4_PORTS)) == (PDC_FLAG_GEN_II|PDC_FLAG_4_PORTS)) {
970 is_sataii_tx4 = 1;
971 dev_printk(KERN_INFO, &pdev->dev, "applying SATAII TX4 port numbering workaround\n");
972 }
973 for (i = 0; i < host->n_ports; i++) {
974 static const unsigned char sataii_tx4_port_remap[4] = { 3, 1, 0, 2};
975 int ata_nr;
976
977 ata_nr = i;
978 if (is_sataii_tx4)
979 ata_nr = sataii_tx4_port_remap[i];
980
966 pdc_ata_setup_port(host->ports[i], 981 pdc_ata_setup_port(host->ports[i],
967 base + 0x200 + i * 0x80, 982 base + 0x200 + ata_nr * 0x80,
968 base + 0x400 + i * 0x100); 983 base + 0x400 + ata_nr * 0x100);
984 }
969 985
970 /* initialize adapter */ 986 /* initialize adapter */
971 pdc_host_init(host); 987 pdc_host_init(host);