aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_sx4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sata_sx4.c')
-rw-r--r--drivers/scsi/sata_sx4.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/scsi/sata_sx4.c b/drivers/scsi/sata_sx4.c
index ac7b0d819ebc..94b253b80da8 100644
--- a/drivers/scsi/sata_sx4.c
+++ b/drivers/scsi/sata_sx4.c
@@ -215,7 +215,7 @@ static const struct ata_port_operations pdc_20621_ops = {
215 .host_stop = pdc20621_host_stop, 215 .host_stop = pdc20621_host_stop,
216}; 216};
217 217
218static struct ata_port_info pdc_port_info[] = { 218static const struct ata_port_info pdc_port_info[] = {
219 /* board_20621 */ 219 /* board_20621 */
220 { 220 {
221 .sht = &pdc_sata_sht, 221 .sht = &pdc_sata_sht,
@@ -719,7 +719,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap,
719 VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->id, 719 VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->id,
720 readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); 720 readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
721 /* get drive status; clear intr; complete txn */ 721 /* get drive status; clear intr; complete txn */
722 ata_qc_complete(qc, ac_err_mask(ata_wait_idle(ap))); 722 qc->err_mask |= ac_err_mask(ata_wait_idle(ap));
723 ata_qc_complete(qc);
723 pdc20621_pop_hdma(qc); 724 pdc20621_pop_hdma(qc);
724 } 725 }
725 726
@@ -757,7 +758,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap,
757 VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->id, 758 VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->id,
758 readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT)); 759 readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
759 /* get drive status; clear intr; complete txn */ 760 /* get drive status; clear intr; complete txn */
760 ata_qc_complete(qc, ac_err_mask(ata_wait_idle(ap))); 761 qc->err_mask |= ac_err_mask(ata_wait_idle(ap));
762 ata_qc_complete(qc);
761 pdc20621_pop_hdma(qc); 763 pdc20621_pop_hdma(qc);
762 } 764 }
763 handled = 1; 765 handled = 1;
@@ -767,7 +769,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap,
767 769
768 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000); 770 status = ata_busy_wait(ap, ATA_BUSY | ATA_DRQ, 1000);
769 DPRINTK("BUS_NODATA (drv_stat 0x%X)\n", status); 771 DPRINTK("BUS_NODATA (drv_stat 0x%X)\n", status);
770 ata_qc_complete(qc, ac_err_mask(status)); 772 qc->err_mask |= ac_err_mask(status);
773 ata_qc_complete(qc);
771 handled = 1; 774 handled = 1;
772 775
773 } else { 776 } else {
@@ -882,7 +885,8 @@ static void pdc_eng_timeout(struct ata_port *ap)
882 case ATA_PROT_DMA: 885 case ATA_PROT_DMA:
883 case ATA_PROT_NODATA: 886 case ATA_PROT_NODATA:
884 printk(KERN_ERR "ata%u: command timeout\n", ap->id); 887 printk(KERN_ERR "ata%u: command timeout\n", ap->id);
885 ata_qc_complete(qc, __ac_err_mask(ata_wait_idle(ap))); 888 qc->err_mask |= __ac_err_mask(ata_wait_idle(ap));
889 ata_qc_complete(qc);
886 break; 890 break;
887 891
888 default: 892 default:
@@ -891,7 +895,8 @@ static void pdc_eng_timeout(struct ata_port *ap)
891 printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n", 895 printk(KERN_ERR "ata%u: unknown timeout, cmd 0x%x stat 0x%x\n",
892 ap->id, qc->tf.command, drv_stat); 896 ap->id, qc->tf.command, drv_stat);
893 897
894 ata_qc_complete(qc, ac_err_mask(drv_stat)); 898 qc->err_mask |= ac_err_mask(drv_stat);
899 ata_qc_complete(qc);
895 break; 900 break;
896 } 901 }
897 902