aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorAdrian Bunk <bunk@kernel.org>2007-11-14 20:35:45 -0500
committerTejun Heo <htejun@gmail.com>2007-11-18 22:28:09 -0500
commit21bef6dd2b419f28c8096a8e30ad86dcbff44c02 (patch)
tree704912dbb4c28fd1a49d9256193762c19255d7a4 /drivers/ata
parentde753e5e8678d9674de0a3bda9ead9e770fdbf53 (diff)
libata: remove unused functions
This patch removes the following obsolete functions: - libata-core.c: __sata_phy_reset() - libata-core.c: sata_phy_reset() - libata-eh.c: ata_qc_timeout() - libata-eh.c: ata_eng_timeout() Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/libata-core.c78
-rw-r--r--drivers/ata/libata-eh.c95
2 files changed, 0 insertions, 173 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 81898036dbca..1584164e7704 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2581,81 +2581,6 @@ void sata_print_link_status(struct ata_link *link)
2581} 2581}
2582 2582
2583/** 2583/**
2584 * __sata_phy_reset - Wake/reset a low-level SATA PHY
2585 * @ap: SATA port associated with target SATA PHY.
2586 *
2587 * This function issues commands to standard SATA Sxxx
2588 * PHY registers, to wake up the phy (and device), and
2589 * clear any reset condition.
2590 *
2591 * LOCKING:
2592 * PCI/etc. bus probe sem.
2593 *
2594 */
2595void __sata_phy_reset(struct ata_port *ap)
2596{
2597 struct ata_link *link = &ap->link;
2598 unsigned long timeout = jiffies + (HZ * 5);
2599 u32 sstatus;
2600
2601 if (ap->flags & ATA_FLAG_SATA_RESET) {
2602 /* issue phy wake/reset */
2603 sata_scr_write_flush(link, SCR_CONTROL, 0x301);
2604 /* Couldn't find anything in SATA I/II specs, but
2605 * AHCI-1.1 10.4.2 says at least 1 ms. */
2606 mdelay(1);
2607 }
2608 /* phy wake/clear reset */
2609 sata_scr_write_flush(link, SCR_CONTROL, 0x300);
2610
2611 /* wait for phy to become ready, if necessary */
2612 do {
2613 msleep(200);
2614 sata_scr_read(link, SCR_STATUS, &sstatus);
2615 if ((sstatus & 0xf) != 1)
2616 break;
2617 } while (time_before(jiffies, timeout));
2618
2619 /* print link status */
2620 sata_print_link_status(link);
2621
2622 /* TODO: phy layer with polling, timeouts, etc. */
2623 if (!ata_link_offline(link))
2624 ata_port_probe(ap);
2625 else
2626 ata_port_disable(ap);
2627
2628 if (ap->flags & ATA_FLAG_DISABLED)
2629 return;
2630
2631 if (ata_busy_sleep(ap, ATA_TMOUT_BOOT_QUICK, ATA_TMOUT_BOOT)) {
2632 ata_port_disable(ap);
2633 return;
2634 }
2635
2636 ap->cbl = ATA_CBL_SATA;
2637}
2638
2639/**
2640 * sata_phy_reset - Reset SATA bus.
2641 * @ap: SATA port associated with target SATA PHY.
2642 *
2643 * This function resets the SATA bus, and then probes
2644 * the bus for devices.
2645 *
2646 * LOCKING:
2647 * PCI/etc. bus probe sem.
2648 *
2649 */
2650void sata_phy_reset(struct ata_port *ap)
2651{
2652 __sata_phy_reset(ap);
2653 if (ap->flags & ATA_FLAG_DISABLED)
2654 return;
2655 ata_bus_reset(ap);
2656}
2657
2658/**
2659 * ata_dev_pair - return other device on cable 2584 * ata_dev_pair - return other device on cable
2660 * @adev: device 2585 * @adev: device
2661 * 2586 *
@@ -7653,8 +7578,6 @@ EXPORT_SYMBOL_GPL(ata_dev_disable);
7653EXPORT_SYMBOL_GPL(sata_set_spd); 7578EXPORT_SYMBOL_GPL(sata_set_spd);
7654EXPORT_SYMBOL_GPL(sata_link_debounce); 7579EXPORT_SYMBOL_GPL(sata_link_debounce);
7655EXPORT_SYMBOL_GPL(sata_link_resume); 7580EXPORT_SYMBOL_GPL(sata_link_resume);
7656EXPORT_SYMBOL_GPL(sata_phy_reset);
7657EXPORT_SYMBOL_GPL(__sata_phy_reset);
7658EXPORT_SYMBOL_GPL(ata_bus_reset); 7581EXPORT_SYMBOL_GPL(ata_bus_reset);
7659EXPORT_SYMBOL_GPL(ata_std_prereset); 7582EXPORT_SYMBOL_GPL(ata_std_prereset);
7660EXPORT_SYMBOL_GPL(ata_std_softreset); 7583EXPORT_SYMBOL_GPL(ata_std_softreset);
@@ -7725,7 +7648,6 @@ EXPORT_SYMBOL_GPL(ata_port_desc);
7725#ifdef CONFIG_PCI 7648#ifdef CONFIG_PCI
7726EXPORT_SYMBOL_GPL(ata_port_pbar_desc); 7649EXPORT_SYMBOL_GPL(ata_port_pbar_desc);
7727#endif /* CONFIG_PCI */ 7650#endif /* CONFIG_PCI */
7728EXPORT_SYMBOL_GPL(ata_eng_timeout);
7729EXPORT_SYMBOL_GPL(ata_port_schedule_eh); 7651EXPORT_SYMBOL_GPL(ata_port_schedule_eh);
7730EXPORT_SYMBOL_GPL(ata_link_abort); 7652EXPORT_SYMBOL_GPL(ata_link_abort);
7731EXPORT_SYMBOL_GPL(ata_port_abort); 7653EXPORT_SYMBOL_GPL(ata_port_abort);
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index ed8813b222a0..0dac69db1fdf 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -559,101 +559,6 @@ void ata_port_wait_eh(struct ata_port *ap)
559 } 559 }
560} 560}
561 561
562/**
563 * ata_qc_timeout - Handle timeout of queued command
564 * @qc: Command that timed out
565 *
566 * Some part of the kernel (currently, only the SCSI layer)
567 * has noticed that the active command on port @ap has not
568 * completed after a specified length of time. Handle this
569 * condition by disabling DMA (if necessary) and completing
570 * transactions, with error if necessary.
571 *
572 * This also handles the case of the "lost interrupt", where
573 * for some reason (possibly hardware bug, possibly driver bug)
574 * an interrupt was not delivered to the driver, even though the
575 * transaction completed successfully.
576 *
577 * TODO: kill this function once old EH is gone.
578 *
579 * LOCKING:
580 * Inherited from SCSI layer (none, can sleep)
581 */
582static void ata_qc_timeout(struct ata_queued_cmd *qc)
583{
584 struct ata_port *ap = qc->ap;
585 u8 host_stat = 0, drv_stat;
586 unsigned long flags;
587
588 DPRINTK("ENTER\n");
589
590 ap->hsm_task_state = HSM_ST_IDLE;
591
592 spin_lock_irqsave(ap->lock, flags);
593
594 switch (qc->tf.protocol) {
595
596 case ATA_PROT_DMA:
597 case ATA_PROT_ATAPI_DMA:
598 host_stat = ap->ops->bmdma_status(ap);
599
600 /* before we do anything else, clear DMA-Start bit */
601 ap->ops->bmdma_stop(qc);
602
603 /* fall through */
604
605 default:
606 ata_altstatus(ap);
607 drv_stat = ata_chk_status(ap);
608
609 /* ack bmdma irq events */
610 ap->ops->irq_clear(ap);
611
612 ata_dev_printk(qc->dev, KERN_ERR, "command 0x%x timeout, "
613 "stat 0x%x host_stat 0x%x\n",
614 qc->tf.command, drv_stat, host_stat);
615
616 /* complete taskfile transaction */
617 qc->err_mask |= AC_ERR_TIMEOUT;
618 break;
619 }
620
621 spin_unlock_irqrestore(ap->lock, flags);
622
623 ata_eh_qc_complete(qc);
624
625 DPRINTK("EXIT\n");
626}
627
628/**
629 * ata_eng_timeout - Handle timeout of queued command
630 * @ap: Port on which timed-out command is active
631 *
632 * Some part of the kernel (currently, only the SCSI layer)
633 * has noticed that the active command on port @ap has not
634 * completed after a specified length of time. Handle this
635 * condition by disabling DMA (if necessary) and completing
636 * transactions, with error if necessary.
637 *
638 * This also handles the case of the "lost interrupt", where
639 * for some reason (possibly hardware bug, possibly driver bug)
640 * an interrupt was not delivered to the driver, even though the
641 * transaction completed successfully.
642 *
643 * TODO: kill this function once old EH is gone.
644 *
645 * LOCKING:
646 * Inherited from SCSI layer (none, can sleep)
647 */
648void ata_eng_timeout(struct ata_port *ap)
649{
650 DPRINTK("ENTER\n");
651
652 ata_qc_timeout(ata_qc_from_tag(ap, ap->link.active_tag));
653
654 DPRINTK("EXIT\n");
655}
656
657static int ata_eh_nr_in_flight(struct ata_port *ap) 562static int ata_eh_nr_in_flight(struct ata_port *ap)
658{ 563{
659 unsigned int tag; 564 unsigned int tag;