diff options
author | Tejun Heo <htejun@gmail.com> | 2008-04-07 09:47:16 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:21 -0400 |
commit | 9363c3825ea9ad76561eb48a395349dd29211ed6 (patch) | |
tree | abe89a0f7c82b805d84b1a211c97b317f6628d5f /drivers/ata/sata_nv.c | |
parent | b67a1064cb1c1d3b43e01e8b43a6a8dcdefed733 (diff) |
libata: rename SFF functions
SFF functions have confusing names. Some have sff prefix, some have
bmdma, some std, some pci and some none. Unify the naming by...
* SFF functions which are common to both BMDMA and non-BMDMA are
prefixed with ata_sff_.
* SFF functions which are specific to BMDMA are prefixed with
ata_bmdma_.
* SFF functions which are specific to PCI but apply to both BMDMA and
non-BMDMA are prefixed with ata_pci_sff_.
* SFF functions which are specific to PCI and BMDMA are prefixed with
ata_pci_bmdma_.
* Drop generic prefixes from LLD specific routines. For example,
bfin_std_dev_select -> bfin_dev_select.
The following renames are noteworthy.
ata_qc_issue_prot() -> ata_sff_qc_issue()
ata_pci_default_filter() -> ata_bmdma_mode_filter()
ata_dev_try_classify() -> ata_sff_dev_classify()
This rename is in preparation of separating SFF support out of libata
core layer. This patch strictly renames functions and doesn't
introduce any behavior difference.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/sata_nv.c')
-rw-r--r-- | drivers/ata/sata_nv.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 95fd0cd28b49..63cc43765f04 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
@@ -730,7 +730,7 @@ static void nv_adma_tf_read(struct ata_port *ap, struct ata_taskfile *tf) | |||
730 | ADMA mode could abort outstanding commands. */ | 730 | ADMA mode could abort outstanding commands. */ |
731 | nv_adma_register_mode(ap); | 731 | nv_adma_register_mode(ap); |
732 | 732 | ||
733 | ata_tf_read(ap, tf); | 733 | ata_sff_tf_read(ap, tf); |
734 | } | 734 | } |
735 | 735 | ||
736 | static unsigned int nv_adma_tf_to_cpb(struct ata_taskfile *tf, __le16 *cpb) | 736 | static unsigned int nv_adma_tf_to_cpb(struct ata_taskfile *tf, __le16 *cpb) |
@@ -844,12 +844,12 @@ static int nv_host_intr(struct ata_port *ap, u8 irq_stat) | |||
844 | 844 | ||
845 | /* DEV interrupt w/ no active qc? */ | 845 | /* DEV interrupt w/ no active qc? */ |
846 | if (unlikely(!qc || (qc->tf.flags & ATA_TFLAG_POLLING))) { | 846 | if (unlikely(!qc || (qc->tf.flags & ATA_TFLAG_POLLING))) { |
847 | ata_check_status(ap); | 847 | ata_sff_check_status(ap); |
848 | return 1; | 848 | return 1; |
849 | } | 849 | } |
850 | 850 | ||
851 | /* handle interrupt */ | 851 | /* handle interrupt */ |
852 | return ata_host_intr(ap, qc); | 852 | return ata_sff_host_intr(ap, qc); |
853 | } | 853 | } |
854 | 854 | ||
855 | static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance) | 855 | static irqreturn_t nv_adma_interrupt(int irq, void *dev_instance) |
@@ -1028,7 +1028,7 @@ static void nv_adma_irq_clear(struct ata_port *ap) | |||
1028 | u32 notifier_clears[2]; | 1028 | u32 notifier_clears[2]; |
1029 | 1029 | ||
1030 | if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) { | 1030 | if (pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) { |
1031 | ata_bmdma_irq_clear(ap); | 1031 | ata_sff_irq_clear(ap); |
1032 | return; | 1032 | return; |
1033 | } | 1033 | } |
1034 | 1034 | ||
@@ -1059,7 +1059,7 @@ static void nv_adma_post_internal_cmd(struct ata_queued_cmd *qc) | |||
1059 | struct nv_adma_port_priv *pp = qc->ap->private_data; | 1059 | struct nv_adma_port_priv *pp = qc->ap->private_data; |
1060 | 1060 | ||
1061 | if (pp->flags & NV_ADMA_PORT_REGISTER_MODE) | 1061 | if (pp->flags & NV_ADMA_PORT_REGISTER_MODE) |
1062 | ata_bmdma_post_internal_cmd(qc); | 1062 | ata_sff_post_internal_cmd(qc); |
1063 | } | 1063 | } |
1064 | 1064 | ||
1065 | static int nv_adma_port_start(struct ata_port *ap) | 1065 | static int nv_adma_port_start(struct ata_port *ap) |
@@ -1336,7 +1336,7 @@ static void nv_adma_qc_prep(struct ata_queued_cmd *qc) | |||
1336 | BUG_ON(!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) && | 1336 | BUG_ON(!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) && |
1337 | (qc->flags & ATA_QCFLAG_DMAMAP)); | 1337 | (qc->flags & ATA_QCFLAG_DMAMAP)); |
1338 | nv_adma_register_mode(qc->ap); | 1338 | nv_adma_register_mode(qc->ap); |
1339 | ata_qc_prep(qc); | 1339 | ata_sff_qc_prep(qc); |
1340 | return; | 1340 | return; |
1341 | } | 1341 | } |
1342 | 1342 | ||
@@ -1395,7 +1395,7 @@ static unsigned int nv_adma_qc_issue(struct ata_queued_cmd *qc) | |||
1395 | BUG_ON(!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) && | 1395 | BUG_ON(!(pp->flags & NV_ADMA_ATAPI_SETUP_COMPLETE) && |
1396 | (qc->flags & ATA_QCFLAG_DMAMAP)); | 1396 | (qc->flags & ATA_QCFLAG_DMAMAP)); |
1397 | nv_adma_register_mode(qc->ap); | 1397 | nv_adma_register_mode(qc->ap); |
1398 | return ata_qc_issue_prot(qc); | 1398 | return ata_sff_qc_issue(qc); |
1399 | } else | 1399 | } else |
1400 | nv_adma_mode(qc->ap); | 1400 | nv_adma_mode(qc->ap); |
1401 | 1401 | ||
@@ -1436,7 +1436,7 @@ static irqreturn_t nv_generic_interrupt(int irq, void *dev_instance) | |||
1436 | 1436 | ||
1437 | qc = ata_qc_from_tag(ap, ap->link.active_tag); | 1437 | qc = ata_qc_from_tag(ap, ap->link.active_tag); |
1438 | if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) | 1438 | if (qc && (!(qc->tf.flags & ATA_TFLAG_POLLING))) |
1439 | handled += ata_host_intr(ap, qc); | 1439 | handled += ata_sff_host_intr(ap, qc); |
1440 | else | 1440 | else |
1441 | // No request pending? Clear interrupt status | 1441 | // No request pending? Clear interrupt status |
1442 | // anyway, in case there's one pending. | 1442 | // anyway, in case there's one pending. |
@@ -1571,7 +1571,7 @@ static void nv_mcp55_freeze(struct ata_port *ap) | |||
1571 | mask = readl(mmio_base + NV_INT_ENABLE_MCP55); | 1571 | mask = readl(mmio_base + NV_INT_ENABLE_MCP55); |
1572 | mask &= ~(NV_INT_ALL_MCP55 << shift); | 1572 | mask &= ~(NV_INT_ALL_MCP55 << shift); |
1573 | writel(mask, mmio_base + NV_INT_ENABLE_MCP55); | 1573 | writel(mask, mmio_base + NV_INT_ENABLE_MCP55); |
1574 | ata_bmdma_freeze(ap); | 1574 | ata_sff_freeze(ap); |
1575 | } | 1575 | } |
1576 | 1576 | ||
1577 | static void nv_mcp55_thaw(struct ata_port *ap) | 1577 | static void nv_mcp55_thaw(struct ata_port *ap) |
@@ -1585,7 +1585,7 @@ static void nv_mcp55_thaw(struct ata_port *ap) | |||
1585 | mask = readl(mmio_base + NV_INT_ENABLE_MCP55); | 1585 | mask = readl(mmio_base + NV_INT_ENABLE_MCP55); |
1586 | mask |= (NV_INT_MASK_MCP55 << shift); | 1586 | mask |= (NV_INT_MASK_MCP55 << shift); |
1587 | writel(mask, mmio_base + NV_INT_ENABLE_MCP55); | 1587 | writel(mask, mmio_base + NV_INT_ENABLE_MCP55); |
1588 | ata_bmdma_thaw(ap); | 1588 | ata_sff_thaw(ap); |
1589 | } | 1589 | } |
1590 | 1590 | ||
1591 | static int nv_hardreset(struct ata_link *link, unsigned int *class, | 1591 | static int nv_hardreset(struct ata_link *link, unsigned int *class, |
@@ -1597,7 +1597,7 @@ static int nv_hardreset(struct ata_link *link, unsigned int *class, | |||
1597 | * some controllers. Don't classify on hardreset. For more | 1597 | * some controllers. Don't classify on hardreset. For more |
1598 | * info, see http://bugzilla.kernel.org/show_bug.cgi?id=3352 | 1598 | * info, see http://bugzilla.kernel.org/show_bug.cgi?id=3352 |
1599 | */ | 1599 | */ |
1600 | return sata_std_hardreset(link, &dummy, deadline); | 1600 | return sata_sff_hardreset(link, &dummy, deadline); |
1601 | } | 1601 | } |
1602 | 1602 | ||
1603 | static void nv_adma_error_handler(struct ata_port *ap) | 1603 | static void nv_adma_error_handler(struct ata_port *ap) |
@@ -1653,7 +1653,7 @@ static void nv_adma_error_handler(struct ata_port *ap) | |||
1653 | readw(mmio + NV_ADMA_CTL); /* flush posted write */ | 1653 | readw(mmio + NV_ADMA_CTL); /* flush posted write */ |
1654 | } | 1654 | } |
1655 | 1655 | ||
1656 | ata_bmdma_error_handler(ap); | 1656 | ata_sff_error_handler(ap); |
1657 | } | 1657 | } |
1658 | 1658 | ||
1659 | static void nv_swncq_qc_to_dq(struct ata_port *ap, struct ata_queued_cmd *qc) | 1659 | static void nv_swncq_qc_to_dq(struct ata_port *ap, struct ata_queued_cmd *qc) |
@@ -1779,7 +1779,7 @@ static void nv_swncq_error_handler(struct ata_port *ap) | |||
1779 | ehc->i.action |= ATA_EH_RESET; | 1779 | ehc->i.action |= ATA_EH_RESET; |
1780 | } | 1780 | } |
1781 | 1781 | ||
1782 | ata_bmdma_error_handler(ap); | 1782 | ata_sff_error_handler(ap); |
1783 | } | 1783 | } |
1784 | 1784 | ||
1785 | #ifdef CONFIG_PM | 1785 | #ifdef CONFIG_PM |
@@ -1925,7 +1925,7 @@ static int nv_swncq_port_start(struct ata_port *ap) | |||
1925 | static void nv_swncq_qc_prep(struct ata_queued_cmd *qc) | 1925 | static void nv_swncq_qc_prep(struct ata_queued_cmd *qc) |
1926 | { | 1926 | { |
1927 | if (qc->tf.protocol != ATA_PROT_NCQ) { | 1927 | if (qc->tf.protocol != ATA_PROT_NCQ) { |
1928 | ata_qc_prep(qc); | 1928 | ata_sff_qc_prep(qc); |
1929 | return; | 1929 | return; |
1930 | } | 1930 | } |
1931 | 1931 | ||
@@ -2001,7 +2001,7 @@ static unsigned int nv_swncq_qc_issue(struct ata_queued_cmd *qc) | |||
2001 | struct nv_swncq_port_priv *pp = ap->private_data; | 2001 | struct nv_swncq_port_priv *pp = ap->private_data; |
2002 | 2002 | ||
2003 | if (qc->tf.protocol != ATA_PROT_NCQ) | 2003 | if (qc->tf.protocol != ATA_PROT_NCQ) |
2004 | return ata_qc_issue_prot(qc); | 2004 | return ata_sff_qc_issue(qc); |
2005 | 2005 | ||
2006 | DPRINTK("Enter\n"); | 2006 | DPRINTK("Enter\n"); |
2007 | 2007 | ||
@@ -2350,7 +2350,7 @@ static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
2350 | 2350 | ||
2351 | ppi[0] = &nv_port_info[type]; | 2351 | ppi[0] = &nv_port_info[type]; |
2352 | ipriv = ppi[0]->private_data; | 2352 | ipriv = ppi[0]->private_data; |
2353 | rc = ata_pci_prepare_sff_host(pdev, ppi, &host); | 2353 | rc = ata_pci_sff_prepare_host(pdev, ppi, &host); |
2354 | if (rc) | 2354 | if (rc) |
2355 | return rc; | 2355 | return rc; |
2356 | 2356 | ||