diff options
Diffstat (limited to 'drivers/ata/sata_dwc_460ex.c')
-rw-r--r-- | drivers/ata/sata_dwc_460ex.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c index 69f7cde49c6b..ae13ef1945ba 100644 --- a/drivers/ata/sata_dwc_460ex.c +++ b/drivers/ata/sata_dwc_460ex.c | |||
@@ -1581,10 +1581,31 @@ static void sata_dwc_qc_prep(struct ata_queued_cmd *qc) | |||
1581 | 1581 | ||
1582 | static void sata_dwc_error_handler(struct ata_port *ap) | 1582 | static void sata_dwc_error_handler(struct ata_port *ap) |
1583 | { | 1583 | { |
1584 | ap->link.flags |= ATA_LFLAG_NO_HRST; | ||
1585 | ata_sff_error_handler(ap); | 1584 | ata_sff_error_handler(ap); |
1586 | } | 1585 | } |
1587 | 1586 | ||
1587 | int sata_dwc_hardreset(struct ata_link *link, unsigned int *class, | ||
1588 | unsigned long deadline) | ||
1589 | { | ||
1590 | struct sata_dwc_device *hsdev = HSDEV_FROM_AP(link->ap); | ||
1591 | int ret; | ||
1592 | |||
1593 | ret = sata_sff_hardreset(link, class, deadline); | ||
1594 | |||
1595 | sata_dwc_enable_interrupts(hsdev); | ||
1596 | |||
1597 | /* Reconfigure the DMA control register */ | ||
1598 | out_le32(&hsdev->sata_dwc_regs->dmacr, | ||
1599 | SATA_DWC_DMACR_TXRXCH_CLEAR); | ||
1600 | |||
1601 | /* Reconfigure the DMA Burst Transaction Size register */ | ||
1602 | out_le32(&hsdev->sata_dwc_regs->dbtsr, | ||
1603 | SATA_DWC_DBTSR_MWR(AHB_DMA_BRST_DFLT) | | ||
1604 | SATA_DWC_DBTSR_MRD(AHB_DMA_BRST_DFLT)); | ||
1605 | |||
1606 | return ret; | ||
1607 | } | ||
1608 | |||
1588 | /* | 1609 | /* |
1589 | * scsi mid-layer and libata interface structures | 1610 | * scsi mid-layer and libata interface structures |
1590 | */ | 1611 | */ |
@@ -1604,6 +1625,7 @@ static struct ata_port_operations sata_dwc_ops = { | |||
1604 | .inherits = &ata_sff_port_ops, | 1625 | .inherits = &ata_sff_port_ops, |
1605 | 1626 | ||
1606 | .error_handler = sata_dwc_error_handler, | 1627 | .error_handler = sata_dwc_error_handler, |
1628 | .hardreset = sata_dwc_hardreset, | ||
1607 | 1629 | ||
1608 | .qc_prep = sata_dwc_qc_prep, | 1630 | .qc_prep = sata_dwc_qc_prep, |
1609 | .qc_issue = sata_dwc_qc_issue, | 1631 | .qc_issue = sata_dwc_qc_issue, |