aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2008-03-25 09:16:44 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-17 15:44:18 -0400
commit6fd36390117f7844ad147377878ddb52088f583a (patch)
treec25d9a8357ff173ce46eb057cc50370b87b9cca8 /drivers/ata/libata-sff.c
parent3d5a3d67a578d95ac3a11a862d16a054e2d4d9cd (diff)
libata: kill ata_chk_status()
ata_chk_status() just calls ops->check_status and it only adds confusion with other status functions. Kill it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index ebdd46bc13c4..c601dcef2925 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -290,7 +290,7 @@ int ata_busy_sleep(struct ata_port *ap,
290 while (status != 0xff && (status & ATA_BUSY) && 290 while (status != 0xff && (status & ATA_BUSY) &&
291 time_before(jiffies, timeout)) { 291 time_before(jiffies, timeout)) {
292 msleep(50); 292 msleep(50);
293 status = ata_chk_status(ap); 293 status = ap->ops->check_status(ap);
294 } 294 }
295 295
296 if (status == 0xff) 296 if (status == 0xff)
@@ -326,7 +326,7 @@ int ata_wait_ready(struct ata_port *ap, unsigned long deadline)
326 int warned = 0; 326 int warned = 0;
327 327
328 while (1) { 328 while (1) {
329 u8 status = ata_chk_status(ap); 329 u8 status = ap->ops->check_status(ap);
330 unsigned long now = jiffies; 330 unsigned long now = jiffies;
331 331
332 if (!(status & ATA_BUSY)) 332 if (!(status & ATA_BUSY))
@@ -1486,7 +1486,7 @@ inline unsigned int ata_host_intr(struct ata_port *ap,
1486 goto idle_irq; 1486 goto idle_irq;
1487 1487
1488 /* check main status, clearing INTRQ */ 1488 /* check main status, clearing INTRQ */
1489 status = ata_chk_status(ap); 1489 status = ap->ops->check_status(ap);
1490 if (unlikely(status & ATA_BUSY)) 1490 if (unlikely(status & ATA_BUSY))
1491 goto idle_irq; 1491 goto idle_irq;
1492 1492
@@ -1506,7 +1506,7 @@ idle_irq:
1506 1506
1507#ifdef ATA_IRQ_TRAP 1507#ifdef ATA_IRQ_TRAP
1508 if ((ap->stats.idle_irq % 1000) == 0) { 1508 if ((ap->stats.idle_irq % 1000) == 0) {
1509 ata_chk_status(ap); 1509 ap->ops->check_status(ap);
1510 ap->ops->irq_clear(ap); 1510 ap->ops->irq_clear(ap);
1511 ata_port_printk(ap, KERN_WARNING, "irq trap\n"); 1511 ata_port_printk(ap, KERN_WARNING, "irq trap\n");
1512 return 1; 1512 return 1;
@@ -1582,7 +1582,7 @@ void ata_bmdma_freeze(struct ata_port *ap)
1582 * ATA_NIEN manipulation. Also, many controllers fail to mask 1582 * ATA_NIEN manipulation. Also, many controllers fail to mask
1583 * previously pending IRQ on ATA_NIEN assertion. Clear it. 1583 * previously pending IRQ on ATA_NIEN assertion. Clear it.
1584 */ 1584 */
1585 ata_chk_status(ap); 1585 ap->ops->check_status(ap);
1586 1586
1587 ap->ops->irq_clear(ap); 1587 ap->ops->irq_clear(ap);
1588} 1588}
@@ -1599,7 +1599,7 @@ void ata_bmdma_freeze(struct ata_port *ap)
1599void ata_bmdma_thaw(struct ata_port *ap) 1599void ata_bmdma_thaw(struct ata_port *ap)
1600{ 1600{
1601 /* clear & re-enable interrupts */ 1601 /* clear & re-enable interrupts */
1602 ata_chk_status(ap); 1602 ap->ops->check_status(ap);
1603 ap->ops->irq_clear(ap); 1603 ap->ops->irq_clear(ap);
1604 ap->ops->irq_on(ap); 1604 ap->ops->irq_on(ap);
1605} 1605}
@@ -1709,7 +1709,7 @@ unsigned int ata_dev_try_classify(struct ata_device *dev, int present,
1709 class = ATA_DEV_ATA; 1709 class = ATA_DEV_ATA;
1710 else 1710 else
1711 class = ATA_DEV_NONE; 1711 class = ATA_DEV_NONE;
1712 } else if ((class == ATA_DEV_ATA) && (ata_chk_status(ap) == 0)) 1712 } else if ((class == ATA_DEV_ATA) && (ap->ops->check_status(ap) == 0))
1713 class = ATA_DEV_NONE; 1713 class = ATA_DEV_NONE;
1714 1714
1715 return class; 1715 return class;
@@ -1820,7 +1820,7 @@ void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline)
1820 */ 1820 */
1821 if (ap->flags & ATA_FLAG_SATA) { 1821 if (ap->flags & ATA_FLAG_SATA) {
1822 while (1) { 1822 while (1) {
1823 u8 status = ata_chk_status(ap); 1823 u8 status = ap->ops->check_status(ap);
1824 1824
1825 if (status != 0xff || time_after(jiffies, deadline)) 1825 if (status != 0xff || time_after(jiffies, deadline))
1826 return; 1826 return;
@@ -1851,7 +1851,7 @@ static int ata_bus_softreset(struct ata_port *ap, unsigned int devmask,
1851 * the bus shows 0xFF because the odd clown forgets the D7 1851 * the bus shows 0xFF because the odd clown forgets the D7
1852 * pulldown resistor. 1852 * pulldown resistor.
1853 */ 1853 */
1854 if (ata_chk_status(ap) == 0xFF) 1854 if (ap->ops->check_status(ap) == 0xFF)
1855 return -ENODEV; 1855 return -ENODEV;
1856 1856
1857 return ata_bus_post_reset(ap, devmask, deadline); 1857 return ata_bus_post_reset(ap, devmask, deadline);
@@ -2034,7 +2034,7 @@ void ata_bmdma_error_handler(struct ata_port *ap)
2034 } 2034 }
2035 2035
2036 ata_altstatus(ap); 2036 ata_altstatus(ap);
2037 ata_chk_status(ap); 2037 ap->ops->check_status(ap);
2038 ap->ops->irq_clear(ap); 2038 ap->ops->irq_clear(ap);
2039 2039
2040 spin_unlock_irqrestore(ap->lock, flags); 2040 spin_unlock_irqrestore(ap->lock, flags);
@@ -2725,7 +2725,6 @@ EXPORT_SYMBOL_GPL(ata_sff_port_ops);
2725EXPORT_SYMBOL_GPL(ata_bmdma_port_ops); 2725EXPORT_SYMBOL_GPL(ata_bmdma_port_ops);
2726EXPORT_SYMBOL_GPL(ata_qc_prep); 2726EXPORT_SYMBOL_GPL(ata_qc_prep);
2727EXPORT_SYMBOL_GPL(ata_dumb_qc_prep); 2727EXPORT_SYMBOL_GPL(ata_dumb_qc_prep);
2728EXPORT_SYMBOL_GPL(ata_pci_default_filter);
2729EXPORT_SYMBOL_GPL(ata_std_dev_select); 2728EXPORT_SYMBOL_GPL(ata_std_dev_select);
2730EXPORT_SYMBOL_GPL(ata_check_status); 2729EXPORT_SYMBOL_GPL(ata_check_status);
2731EXPORT_SYMBOL_GPL(ata_altstatus); 2730EXPORT_SYMBOL_GPL(ata_altstatus);
@@ -2754,6 +2753,7 @@ EXPORT_SYMBOL_GPL(ata_bmdma_error_handler);
2754EXPORT_SYMBOL_GPL(ata_bmdma_post_internal_cmd); 2753EXPORT_SYMBOL_GPL(ata_bmdma_post_internal_cmd);
2755EXPORT_SYMBOL_GPL(ata_sff_port_start); 2754EXPORT_SYMBOL_GPL(ata_sff_port_start);
2756EXPORT_SYMBOL_GPL(ata_std_ports); 2755EXPORT_SYMBOL_GPL(ata_std_ports);
2756EXPORT_SYMBOL_GPL(ata_pci_default_filter);
2757EXPORT_SYMBOL_GPL(ata_bmdma_setup); 2757EXPORT_SYMBOL_GPL(ata_bmdma_setup);
2758EXPORT_SYMBOL_GPL(ata_bmdma_start); 2758EXPORT_SYMBOL_GPL(ata_bmdma_start);
2759EXPORT_SYMBOL_GPL(ata_bmdma_stop); 2759EXPORT_SYMBOL_GPL(ata_bmdma_stop);