aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_mv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_mv.c')
-rw-r--r--drivers/ata/sata_mv.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 6ebebde8454a..a4944c8ad46d 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1524,14 +1524,14 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
1524 EDMA_ERR_CRQB_PAR | EDMA_ERR_CRPB_PAR | 1524 EDMA_ERR_CRQB_PAR | EDMA_ERR_CRPB_PAR |
1525 EDMA_ERR_INTRL_PAR)) { 1525 EDMA_ERR_INTRL_PAR)) {
1526 err_mask |= AC_ERR_ATA_BUS; 1526 err_mask |= AC_ERR_ATA_BUS;
1527 action |= ATA_EH_HARDRESET; 1527 action |= ATA_EH_RESET;
1528 ata_ehi_push_desc(ehi, "parity error"); 1528 ata_ehi_push_desc(ehi, "parity error");
1529 } 1529 }
1530 if (edma_err_cause & (EDMA_ERR_DEV_DCON | EDMA_ERR_DEV_CON)) { 1530 if (edma_err_cause & (EDMA_ERR_DEV_DCON | EDMA_ERR_DEV_CON)) {
1531 ata_ehi_hotplugged(ehi); 1531 ata_ehi_hotplugged(ehi);
1532 ata_ehi_push_desc(ehi, edma_err_cause & EDMA_ERR_DEV_DCON ? 1532 ata_ehi_push_desc(ehi, edma_err_cause & EDMA_ERR_DEV_DCON ?
1533 "dev disconnect" : "dev connect"); 1533 "dev disconnect" : "dev connect");
1534 action |= ATA_EH_HARDRESET; 1534 action |= ATA_EH_RESET;
1535 } 1535 }
1536 1536
1537 if (IS_GEN_I(hpriv)) { 1537 if (IS_GEN_I(hpriv)) {
@@ -1555,7 +1555,7 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
1555 sata_scr_read(&ap->link, SCR_ERROR, &serr); 1555 sata_scr_read(&ap->link, SCR_ERROR, &serr);
1556 sata_scr_write_flush(&ap->link, SCR_ERROR, serr); 1556 sata_scr_write_flush(&ap->link, SCR_ERROR, serr);
1557 err_mask = AC_ERR_ATA_BUS; 1557 err_mask = AC_ERR_ATA_BUS;
1558 action |= ATA_EH_HARDRESET; 1558 action |= ATA_EH_RESET;
1559 } 1559 }
1560 } 1560 }
1561 1561
@@ -1564,7 +1564,7 @@ static void mv_err_intr(struct ata_port *ap, struct ata_queued_cmd *qc)
1564 1564
1565 if (!err_mask) { 1565 if (!err_mask) {
1566 err_mask = AC_ERR_OTHER; 1566 err_mask = AC_ERR_OTHER;
1567 action |= ATA_EH_HARDRESET; 1567 action |= ATA_EH_RESET;
1568 } 1568 }
1569 1569
1570 ehi->serror |= serr; 1570 ehi->serror |= serr;
@@ -1780,7 +1780,7 @@ static void mv_pci_error(struct ata_host *host, void __iomem *mmio)
1780 ata_ehi_push_desc(ehi, 1780 ata_ehi_push_desc(ehi,
1781 "PCI err cause 0x%08x", err_cause); 1781 "PCI err cause 0x%08x", err_cause);
1782 err_mask = AC_ERR_HOST_BUS; 1782 err_mask = AC_ERR_HOST_BUS;
1783 ehi->action = ATA_EH_HARDRESET; 1783 ehi->action = ATA_EH_RESET;
1784 qc = ata_qc_from_tag(ap, ap->link.active_tag); 1784 qc = ata_qc_from_tag(ap, ap->link.active_tag);
1785 if (qc) 1785 if (qc)
1786 qc->err_mask |= err_mask; 1786 qc->err_mask |= err_mask;
@@ -2449,28 +2449,13 @@ static int mv_prereset(struct ata_link *link, unsigned long deadline)
2449{ 2449{
2450 struct ata_port *ap = link->ap; 2450 struct ata_port *ap = link->ap;
2451 struct mv_port_priv *pp = ap->private_data; 2451 struct mv_port_priv *pp = ap->private_data;
2452 struct ata_eh_context *ehc = &link->eh_context;
2453 int rc;
2454 2452
2455 rc = mv_stop_dma(ap); 2453 mv_stop_dma(ap);
2456 if (rc)
2457 ehc->i.action |= ATA_EH_HARDRESET;
2458 2454
2459 if (!(pp->pp_flags & MV_PP_FLAG_HAD_A_RESET)) { 2455 if (!(pp->pp_flags & MV_PP_FLAG_HAD_A_RESET))
2460 pp->pp_flags |= MV_PP_FLAG_HAD_A_RESET; 2456 pp->pp_flags |= MV_PP_FLAG_HAD_A_RESET;
2461 ehc->i.action |= ATA_EH_HARDRESET;
2462 }
2463
2464 /* if we're about to do hardreset, nothing more to do */
2465 if (ehc->i.action & ATA_EH_HARDRESET)
2466 return 0;
2467
2468 if (ata_link_online(link))
2469 rc = ata_wait_ready(ap, deadline);
2470 else
2471 rc = -ENODEV;
2472 2457
2473 return rc; 2458 return 0;
2474} 2459}
2475 2460
2476static int mv_hardreset(struct ata_link *link, unsigned int *class, 2461static int mv_hardreset(struct ata_link *link, unsigned int *class,