aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_nv.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r--drivers/ata/sata_nv.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c
index 5637b082bc85..b2eb5724cf85 100644
--- a/drivers/ata/sata_nv.c
+++ b/drivers/ata/sata_nv.c
@@ -309,7 +309,8 @@ static void nv_nf2_freeze(struct ata_port *ap);
309static void nv_nf2_thaw(struct ata_port *ap); 309static void nv_nf2_thaw(struct ata_port *ap);
310static void nv_ck804_freeze(struct ata_port *ap); 310static void nv_ck804_freeze(struct ata_port *ap);
311static void nv_ck804_thaw(struct ata_port *ap); 311static void nv_ck804_thaw(struct ata_port *ap);
312static void nv_error_handler(struct ata_port *ap); 312static int nv_hardreset(struct ata_link *link, unsigned int *class,
313 unsigned long deadline);
313static int nv_adma_slave_config(struct scsi_device *sdev); 314static int nv_adma_slave_config(struct scsi_device *sdev);
314static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc); 315static int nv_adma_check_atapi_dma(struct ata_queued_cmd *qc);
315static void nv_adma_qc_prep(struct ata_queued_cmd *qc); 316static void nv_adma_qc_prep(struct ata_queued_cmd *qc);
@@ -406,7 +407,7 @@ static struct scsi_host_template nv_swncq_sht = {
406 407
407static struct ata_port_operations nv_generic_ops = { 408static struct ata_port_operations nv_generic_ops = {
408 .inherits = &ata_bmdma_port_ops, 409 .inherits = &ata_bmdma_port_ops,
409 .error_handler = nv_error_handler, 410 .hardreset = nv_hardreset,
410 .scr_read = nv_scr_read, 411 .scr_read = nv_scr_read,
411 .scr_write = nv_scr_write, 412 .scr_write = nv_scr_write,
412}; 413};
@@ -1599,12 +1600,6 @@ static int nv_hardreset(struct ata_link *link, unsigned int *class,
1599 return sata_std_hardreset(link, &dummy, deadline); 1600 return sata_std_hardreset(link, &dummy, deadline);
1600} 1601}
1601 1602
1602static void nv_error_handler(struct ata_port *ap)
1603{
1604 ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset,
1605 nv_hardreset, ata_std_postreset);
1606}
1607
1608static void nv_adma_error_handler(struct ata_port *ap) 1603static void nv_adma_error_handler(struct ata_port *ap)
1609{ 1604{
1610 struct nv_adma_port_priv *pp = ap->private_data; 1605 struct nv_adma_port_priv *pp = ap->private_data;
@@ -1658,8 +1653,7 @@ static void nv_adma_error_handler(struct ata_port *ap)
1658 readw(mmio + NV_ADMA_CTL); /* flush posted write */ 1653 readw(mmio + NV_ADMA_CTL); /* flush posted write */
1659 } 1654 }
1660 1655
1661 ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, 1656 ata_bmdma_error_handler(ap);
1662 nv_hardreset, ata_std_postreset);
1663} 1657}
1664 1658
1665static void nv_swncq_qc_to_dq(struct ata_port *ap, struct ata_queued_cmd *qc) 1659static void nv_swncq_qc_to_dq(struct ata_port *ap, struct ata_queued_cmd *qc)
@@ -1785,8 +1779,7 @@ static void nv_swncq_error_handler(struct ata_port *ap)
1785 ehc->i.action |= ATA_EH_RESET; 1779 ehc->i.action |= ATA_EH_RESET;
1786 } 1780 }
1787 1781
1788 ata_bmdma_drive_eh(ap, ata_std_prereset, ata_std_softreset, 1782 ata_bmdma_error_handler(ap);
1789 nv_hardreset, ata_std_postreset);
1790} 1783}
1791 1784
1792#ifdef CONFIG_PM 1785#ifdef CONFIG_PM