diff options
author | Tejun Heo <htejun@gmail.com> | 2006-03-05 01:29:09 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-11 17:57:20 -0500 |
commit | 507ceda00302c071029277652d9faa5a0a55419a (patch) | |
tree | 603cbc777845d37e2045be96f5f9f1c27d7fe33a /drivers/scsi | |
parent | 8061f5f0a04cfd2bc7aa273596ad3fcd426f8eea (diff) |
[PATCH] libata: kill unused pio_task and packet_task
Kill unused pio_task and packet_task.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 16a108d2f9a9..2974438d3bb7 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -796,71 +796,6 @@ void ata_port_flush_task(struct ata_port *ap) | |||
796 | DPRINTK("EXIT\n"); | 796 | DPRINTK("EXIT\n"); |
797 | } | 797 | } |
798 | 798 | ||
799 | static inline void | ||
800 | ata_queue_packet_task(struct ata_port *ap) | ||
801 | { | ||
802 | if (!(ap->flags & ATA_FLAG_FLUSH_PIO_TASK)) | ||
803 | queue_work(ata_wq, &ap->packet_task); | ||
804 | } | ||
805 | |||
806 | static inline void | ||
807 | ata_queue_pio_task(struct ata_port *ap) | ||
808 | { | ||
809 | if (!(ap->flags & ATA_FLAG_FLUSH_PIO_TASK)) | ||
810 | queue_work(ata_wq, &ap->pio_task); | ||
811 | } | ||
812 | |||
813 | static inline void | ||
814 | ata_queue_delayed_pio_task(struct ata_port *ap, unsigned long delay) | ||
815 | { | ||
816 | if (!(ap->flags & ATA_FLAG_FLUSH_PIO_TASK)) | ||
817 | queue_delayed_work(ata_wq, &ap->pio_task, delay); | ||
818 | } | ||
819 | |||
820 | /** | ||
821 | * ata_flush_pio_tasks - Flush pio_task and packet_task | ||
822 | * @ap: the target ata_port | ||
823 | * | ||
824 | * After this function completes, pio_task and packet_task are | ||
825 | * guranteed not to be running or scheduled. | ||
826 | * | ||
827 | * LOCKING: | ||
828 | * Kernel thread context (may sleep) | ||
829 | */ | ||
830 | |||
831 | static void ata_flush_pio_tasks(struct ata_port *ap) | ||
832 | { | ||
833 | int tmp = 0; | ||
834 | unsigned long flags; | ||
835 | |||
836 | DPRINTK("ENTER\n"); | ||
837 | |||
838 | spin_lock_irqsave(&ap->host_set->lock, flags); | ||
839 | ap->flags |= ATA_FLAG_FLUSH_PIO_TASK; | ||
840 | spin_unlock_irqrestore(&ap->host_set->lock, flags); | ||
841 | |||
842 | DPRINTK("flush #1\n"); | ||
843 | flush_workqueue(ata_wq); | ||
844 | |||
845 | /* | ||
846 | * At this point, if a task is running, it's guaranteed to see | ||
847 | * the FLUSH flag; thus, it will never queue pio tasks again. | ||
848 | * Cancel and flush. | ||
849 | */ | ||
850 | tmp |= cancel_delayed_work(&ap->pio_task); | ||
851 | tmp |= cancel_delayed_work(&ap->packet_task); | ||
852 | if (!tmp) { | ||
853 | DPRINTK("flush #2\n"); | ||
854 | flush_workqueue(ata_wq); | ||
855 | } | ||
856 | |||
857 | spin_lock_irqsave(&ap->host_set->lock, flags); | ||
858 | ap->flags &= ~ATA_FLAG_FLUSH_PIO_TASK; | ||
859 | spin_unlock_irqrestore(&ap->host_set->lock, flags); | ||
860 | |||
861 | DPRINTK("EXIT\n"); | ||
862 | } | ||
863 | |||
864 | void ata_qc_complete_internal(struct ata_queued_cmd *qc) | 799 | void ata_qc_complete_internal(struct ata_queued_cmd *qc) |
865 | { | 800 | { |
866 | struct completion *waiting = qc->private_data; | 801 | struct completion *waiting = qc->private_data; |
@@ -3814,7 +3749,6 @@ static void ata_qc_timeout(struct ata_queued_cmd *qc) | |||
3814 | 3749 | ||
3815 | DPRINTK("ENTER\n"); | 3750 | DPRINTK("ENTER\n"); |
3816 | 3751 | ||
3817 | ata_flush_pio_tasks(ap); | ||
3818 | ap->hsm_task_state = HSM_ST_IDLE; | 3752 | ap->hsm_task_state = HSM_ST_IDLE; |
3819 | 3753 | ||
3820 | spin_lock_irqsave(&host_set->lock, flags); | 3754 | spin_lock_irqsave(&host_set->lock, flags); |
@@ -4693,8 +4627,6 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host, | |||
4693 | ap->last_ctl = 0xFF; | 4627 | ap->last_ctl = 0xFF; |
4694 | 4628 | ||
4695 | INIT_WORK(&ap->port_task, NULL, NULL); | 4629 | INIT_WORK(&ap->port_task, NULL, NULL); |
4696 | INIT_WORK(&ap->packet_task, atapi_packet_task, ap); | ||
4697 | INIT_WORK(&ap->pio_task, ata_pio_task, ap); | ||
4698 | INIT_LIST_HEAD(&ap->eh_done_q); | 4630 | INIT_LIST_HEAD(&ap->eh_done_q); |
4699 | 4631 | ||
4700 | for (i = 0; i < ATA_MAX_DEVICES; i++) | 4632 | for (i = 0; i < ATA_MAX_DEVICES; i++) |