aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_mv.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pobox.com>2005-10-30 20:25:28 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-10-30 20:25:28 -0500
commit122401ce39faab22b29eb11b20e4342f7f566b1b (patch)
treee164f8fa5decc4b7182e7d66b1634c7fd43b9f7f /drivers/scsi/sata_mv.c
parent94ec1ef1cf29e137e5c79372e432b040c6604be6 (diff)
parent6e9d6b8ee4e0c37d3952256e6472c57490d6780d (diff)
Merge branch 'master'
Diffstat (limited to 'drivers/scsi/sata_mv.c')
-rw-r--r--drivers/scsi/sata_mv.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c
index f22726d8a8ac..2a68b6227464 100644
--- a/drivers/scsi/sata_mv.c
+++ b/drivers/scsi/sata_mv.c
@@ -29,6 +29,7 @@
29#include <linux/interrupt.h> 29#include <linux/interrupt.h>
30#include <linux/sched.h> 30#include <linux/sched.h>
31#include <linux/dma-mapping.h> 31#include <linux/dma-mapping.h>
32#include <linux/device.h>
32#include "scsi.h" 33#include "scsi.h"
33#include <scsi/scsi_host.h> 34#include <scsi/scsi_host.h>
34#include <linux/libata.h> 35#include <linux/libata.h>
@@ -1066,6 +1067,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
1066 struct ata_queued_cmd *qc; 1067 struct ata_queued_cmd *qc;
1067 u32 hc_irq_cause; 1068 u32 hc_irq_cause;
1068 int shift, port, port0, hard_port, handled; 1069 int shift, port, port0, hard_port, handled;
1070 unsigned int err_mask;
1069 u8 ata_status = 0; 1071 u8 ata_status = 0;
1070 1072
1071 if (hc == 0) { 1073 if (hc == 0) {
@@ -1101,15 +1103,15 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
1101 handled++; 1103 handled++;
1102 } 1104 }
1103 1105
1106 err_mask = ac_err_mask(ata_status);
1107
1104 shift = port << 1; /* (port * 2) */ 1108 shift = port << 1; /* (port * 2) */
1105 if (port >= MV_PORTS_PER_HC) { 1109 if (port >= MV_PORTS_PER_HC) {
1106 shift++; /* skip bit 8 in the HC Main IRQ reg */ 1110 shift++; /* skip bit 8 in the HC Main IRQ reg */
1107 } 1111 }
1108 if ((PORT0_ERR << shift) & relevant) { 1112 if ((PORT0_ERR << shift) & relevant) {
1109 mv_err_intr(ap); 1113 mv_err_intr(ap);
1110 /* OR in ATA_ERR to ensure libata knows we took one */ 1114 err_mask |= AC_ERR_OTHER;
1111 ata_status = readb((void __iomem *)
1112 ap->ioaddr.status_addr) | ATA_ERR;
1113 handled++; 1115 handled++;
1114 } 1116 }
1115 1117
@@ -1119,7 +1121,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant,
1119 VPRINTK("port %u IRQ found for qc, " 1121 VPRINTK("port %u IRQ found for qc, "
1120 "ata_status 0x%x\n", port,ata_status); 1122 "ata_status 0x%x\n", port,ata_status);
1121 /* mark qc status appropriately */ 1123 /* mark qc status appropriately */
1122 ata_qc_complete(qc, ata_status); 1124 ata_qc_complete(qc, err_mask);
1123 } 1125 }
1124 } 1126 }
1125 } 1127 }
@@ -1295,7 +1297,7 @@ static void mv_eng_timeout(struct ata_port *ap)
1295 */ 1297 */
1296 spin_lock_irqsave(&ap->host_set->lock, flags); 1298 spin_lock_irqsave(&ap->host_set->lock, flags);
1297 qc->scsidone = scsi_finish_command; 1299 qc->scsidone = scsi_finish_command;
1298 ata_qc_complete(qc, ATA_ERR); 1300 ata_qc_complete(qc, AC_ERR_OTHER);
1299 spin_unlock_irqrestore(&ap->host_set->lock, flags); 1301 spin_unlock_irqrestore(&ap->host_set->lock, flags);
1300 } 1302 }
1301} 1303}
@@ -1437,9 +1439,9 @@ static void mv_print_info(struct ata_probe_ent *probe_ent)
1437 else 1439 else
1438 scc_s = "unknown"; 1440 scc_s = "unknown";
1439 1441
1440 printk(KERN_INFO DRV_NAME 1442 dev_printk(KERN_INFO, &pdev->dev,
1441 "(%s) %u slots %u ports %s mode IRQ via %s\n", 1443 "%u slots %u ports %s mode IRQ via %s\n",
1442 pci_name(pdev), (unsigned)MV_MAX_Q_DEPTH, probe_ent->n_ports, 1444 (unsigned)MV_MAX_Q_DEPTH, probe_ent->n_ports,
1443 scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx"); 1445 scc_s, (MV_HP_FLAG_MSI & hpriv->hp_flags) ? "MSI" : "INTx");
1444} 1446}
1445 1447
@@ -1460,9 +1462,8 @@ static int mv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
1460 void __iomem *mmio_base; 1462 void __iomem *mmio_base;
1461 int pci_dev_busy = 0, rc; 1463 int pci_dev_busy = 0, rc;
1462 1464
1463 if (!printed_version++) { 1465 if (!printed_version++)
1464 printk(KERN_INFO DRV_NAME " version " DRV_VERSION "\n"); 1466 dev_printk(KERN_INFO, &pdev->dev, "version " DRV_VERSION "\n");
1465 }
1466 1467
1467 rc = pci_enable_device(pdev); 1468 rc = pci_enable_device(pdev);
1468 if (rc) { 1469 if (rc) {