Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 311477
b: refs/heads/master
c: 3a8b788
h: refs/heads/master
i:
  311475: ab20a2b
v: v3
  • Loading branch information
Thang Q. Nguyen authored and Jeff Garzik committed Jul 25, 2012
1 parent 5ed46e2 commit 9d52954
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2fc75da0c59634b81223af497c4a037822f6e457
refs/heads/master: 3a8b788f61a5b85f3a3a4630dc5f4c13b91e1bba
24 changes: 23 additions & 1 deletion trunk/drivers/ata/sata_dwc_460ex.c
Original file line number Diff line number Diff line change
Expand Up @@ -1581,10 +1581,31 @@ static void sata_dwc_qc_prep(struct ata_queued_cmd *qc)

static void sata_dwc_error_handler(struct ata_port *ap)
{
ap->link.flags |= ATA_LFLAG_NO_HRST;
ata_sff_error_handler(ap);
}

int sata_dwc_hardreset(struct ata_link *link, unsigned int *class,
unsigned long deadline)
{
struct sata_dwc_device *hsdev = HSDEV_FROM_AP(link->ap);
int ret;

ret = sata_sff_hardreset(link, class, deadline);

sata_dwc_enable_interrupts(hsdev);

/* Reconfigure the DMA control register */
out_le32(&hsdev->sata_dwc_regs->dmacr,
SATA_DWC_DMACR_TXRXCH_CLEAR);

/* Reconfigure the DMA Burst Transaction Size register */
out_le32(&hsdev->sata_dwc_regs->dbtsr,
SATA_DWC_DBTSR_MWR(AHB_DMA_BRST_DFLT) |
SATA_DWC_DBTSR_MRD(AHB_DMA_BRST_DFLT));

return ret;
}

/*
* scsi mid-layer and libata interface structures
*/
Expand All @@ -1604,6 +1625,7 @@ static struct ata_port_operations sata_dwc_ops = {
.inherits = &ata_sff_port_ops,

.error_handler = sata_dwc_error_handler,
.hardreset = sata_dwc_hardreset,

.qc_prep = sata_dwc_qc_prep,
.qc_issue = sata_dwc_qc_issue,
Expand Down

0 comments on commit 9d52954

Please sign in to comment.