diff options
author | Albert Lee <albertcc@tw.ibm.com> | 2006-03-25 04:41:43 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-29 17:21:53 -0500 |
commit | 19d5d7309a928eb86f58b37165a2d501621ae3c0 (patch) | |
tree | e811e0a3fa2786cd3b05a7fbb5037e9928737a29 /drivers/scsi | |
parent | 13ee4628ce68d1e54df01cc31239c8887c59e65d (diff) |
[PATCH] libata-dev: Remove atapi_packet_task()
atapi_packet_task() was replaced by ata_pio_task().
Remove the unused atapi_packet_task().
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/libata-core.c | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 9ef5b8ab5b15..0eb75e2dc0e2 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -3850,79 +3850,6 @@ fsm_start: | |||
3850 | } | 3850 | } |
3851 | 3851 | ||
3852 | /** | 3852 | /** |
3853 | * atapi_packet_task - Write CDB bytes to hardware | ||
3854 | * @_data: Port to which ATAPI device is attached. | ||
3855 | * | ||
3856 | * When device has indicated its readiness to accept | ||
3857 | * a CDB, this function is called. Send the CDB. | ||
3858 | * If DMA is to be performed, exit immediately. | ||
3859 | * Otherwise, we are in polling mode, so poll | ||
3860 | * status under operation succeeds or fails. | ||
3861 | * | ||
3862 | * LOCKING: | ||
3863 | * Kernel thread context (may sleep) | ||
3864 | */ | ||
3865 | |||
3866 | static void atapi_packet_task(void *_data) | ||
3867 | { | ||
3868 | struct ata_port *ap = _data; | ||
3869 | struct ata_queued_cmd *qc; | ||
3870 | u8 status; | ||
3871 | |||
3872 | qc = ata_qc_from_tag(ap, ap->active_tag); | ||
3873 | WARN_ON(qc == NULL); | ||
3874 | WARN_ON(!(qc->flags & ATA_QCFLAG_ACTIVE)); | ||
3875 | |||
3876 | /* sleep-wait for BSY to clear */ | ||
3877 | DPRINTK("busy wait\n"); | ||
3878 | if (ata_busy_sleep(ap, ATA_TMOUT_CDB_QUICK, ATA_TMOUT_CDB)) { | ||
3879 | qc->err_mask |= AC_ERR_TIMEOUT; | ||
3880 | goto err_out; | ||
3881 | } | ||
3882 | |||
3883 | /* make sure DRQ is set */ | ||
3884 | status = ata_chk_status(ap); | ||
3885 | if ((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ) { | ||
3886 | qc->err_mask |= AC_ERR_HSM; | ||
3887 | goto err_out; | ||
3888 | } | ||
3889 | |||
3890 | /* send SCSI cdb */ | ||
3891 | DPRINTK("send cdb\n"); | ||
3892 | WARN_ON(qc->dev->cdb_len < 12); | ||
3893 | |||
3894 | if (qc->tf.protocol == ATA_PROT_ATAPI_DMA || | ||
3895 | qc->tf.protocol == ATA_PROT_ATAPI_NODATA) { | ||
3896 | unsigned long flags; | ||
3897 | |||
3898 | /* Once we're done issuing command and kicking bmdma, | ||
3899 | * irq handler takes over. To not lose irq, we need | ||
3900 | * to clear NOINTR flag before sending cdb, but | ||
3901 | * interrupt handler shouldn't be invoked before we're | ||
3902 | * finished. Hence, the following locking. | ||
3903 | */ | ||
3904 | spin_lock_irqsave(&ap->host_set->lock, flags); | ||
3905 | #warning FIXME | ||
3906 | /* ap->flags &= ~ATA_FLAG_NOINTR; */ | ||
3907 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); | ||
3908 | if (qc->tf.protocol == ATA_PROT_ATAPI_DMA) | ||
3909 | ap->ops->bmdma_start(qc); /* initiate bmdma */ | ||
3910 | spin_unlock_irqrestore(&ap->host_set->lock, flags); | ||
3911 | } else { | ||
3912 | ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1); | ||
3913 | |||
3914 | /* PIO commands are handled by polling */ | ||
3915 | ap->hsm_task_state = HSM_ST; | ||
3916 | ata_port_queue_task(ap, ata_pio_task, ap, 0); | ||
3917 | } | ||
3918 | |||
3919 | return; | ||
3920 | |||
3921 | err_out: | ||
3922 | ata_poll_qc_complete(qc); | ||
3923 | } | ||
3924 | |||
3925 | /** | ||
3926 | * ata_qc_timeout - Handle timeout of queued command | 3853 | * ata_qc_timeout - Handle timeout of queued command |
3927 | * @qc: Command that timed out | 3854 | * @qc: Command that timed out |
3928 | * | 3855 | * |