diff options
Diffstat (limited to 'drivers/scsi/sata_mv.c')
-rw-r--r-- | drivers/scsi/sata_mv.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/scsi/sata_mv.c b/drivers/scsi/sata_mv.c index ad4808ef71d4..a3ab14c79cdd 100644 --- a/drivers/scsi/sata_mv.c +++ b/drivers/scsi/sata_mv.c | |||
@@ -1066,6 +1066,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant, | |||
1066 | struct ata_queued_cmd *qc; | 1066 | struct ata_queued_cmd *qc; |
1067 | u32 hc_irq_cause; | 1067 | u32 hc_irq_cause; |
1068 | int shift, port, port0, hard_port, handled; | 1068 | int shift, port, port0, hard_port, handled; |
1069 | unsigned int err_mask; | ||
1069 | u8 ata_status = 0; | 1070 | u8 ata_status = 0; |
1070 | 1071 | ||
1071 | if (hc == 0) { | 1072 | if (hc == 0) { |
@@ -1101,15 +1102,15 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant, | |||
1101 | handled++; | 1102 | handled++; |
1102 | } | 1103 | } |
1103 | 1104 | ||
1105 | err_mask = ac_err_mask(ata_status); | ||
1106 | |||
1104 | shift = port << 1; /* (port * 2) */ | 1107 | shift = port << 1; /* (port * 2) */ |
1105 | if (port >= MV_PORTS_PER_HC) { | 1108 | if (port >= MV_PORTS_PER_HC) { |
1106 | shift++; /* skip bit 8 in the HC Main IRQ reg */ | 1109 | shift++; /* skip bit 8 in the HC Main IRQ reg */ |
1107 | } | 1110 | } |
1108 | if ((PORT0_ERR << shift) & relevant) { | 1111 | if ((PORT0_ERR << shift) & relevant) { |
1109 | mv_err_intr(ap); | 1112 | mv_err_intr(ap); |
1110 | /* OR in ATA_ERR to ensure libata knows we took one */ | 1113 | err_mask |= AC_ERR_OTHER; |
1111 | ata_status = readb((void __iomem *) | ||
1112 | ap->ioaddr.status_addr) | ATA_ERR; | ||
1113 | handled++; | 1114 | handled++; |
1114 | } | 1115 | } |
1115 | 1116 | ||
@@ -1119,7 +1120,7 @@ static void mv_host_intr(struct ata_host_set *host_set, u32 relevant, | |||
1119 | VPRINTK("port %u IRQ found for qc, " | 1120 | VPRINTK("port %u IRQ found for qc, " |
1120 | "ata_status 0x%x\n", port,ata_status); | 1121 | "ata_status 0x%x\n", port,ata_status); |
1121 | /* mark qc status appropriately */ | 1122 | /* mark qc status appropriately */ |
1122 | ata_qc_complete(qc, ata_status); | 1123 | ata_qc_complete(qc, err_mask); |
1123 | } | 1124 | } |
1124 | } | 1125 | } |
1125 | } | 1126 | } |
@@ -1295,7 +1296,7 @@ static void mv_eng_timeout(struct ata_port *ap) | |||
1295 | */ | 1296 | */ |
1296 | spin_lock_irqsave(&ap->host_set->lock, flags); | 1297 | spin_lock_irqsave(&ap->host_set->lock, flags); |
1297 | qc->scsidone = scsi_finish_command; | 1298 | qc->scsidone = scsi_finish_command; |
1298 | ata_qc_complete(qc, ATA_ERR); | 1299 | ata_qc_complete(qc, AC_ERR_OTHER); |
1299 | spin_unlock_irqrestore(&ap->host_set->lock, flags); | 1300 | spin_unlock_irqrestore(&ap->host_set->lock, flags); |
1300 | } | 1301 | } |
1301 | } | 1302 | } |