From: Albert Lee <albertcc@tw.ibm.com>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: IDE Linux <linux-ide@vger.kernel.org>,
Tejun Heo <htejun@gmail.com>, Doug Maxey <dwm@maxeymade.com>
Subject: [PATCH 3/3] libata-dev: Remove atapi_packet_task()
Date: Mon, 13 Mar 2006 15:28:50 +0800 [thread overview]
Message-ID: <44151F32.8050607@tw.ibm.com> (raw)
In-Reply-To: <44151D53.3040606@tw.ibm.com>
Remove unused atapi_packet_task().
Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
---
atapi_packet_task() was replaced by ata_pio_task() in the irq-pio branch.
--- 00_cdblen/drivers/scsi/libata-core.c 2006-03-13 12:25:40.000000000 +0800
+++ 00.5_removeatapi/drivers/scsi/libata-core.c 2006-03-13 11:38:06.000000000 +0800
@@ -3815,79 +3815,6 @@ fsm_start:
}
/**
- * atapi_packet_task - Write CDB bytes to hardware
- * @_data: Port to which ATAPI device is attached.
- *
- * When device has indicated its readiness to accept
- * a CDB, this function is called. Send the CDB.
- * If DMA is to be performed, exit immediately.
- * Otherwise, we are in polling mode, so poll
- * status under operation succeeds or fails.
- *
- * LOCKING:
- * Kernel thread context (may sleep)
- */
-
-static void atapi_packet_task(void *_data)
-{
- struct ata_port *ap = _data;
- struct ata_queued_cmd *qc;
- u8 status;
-
- qc = ata_qc_from_tag(ap, ap->active_tag);
- WARN_ON(qc == NULL);
- WARN_ON(!(qc->flags & ATA_QCFLAG_ACTIVE));
-
- /* sleep-wait for BSY to clear */
- DPRINTK("busy wait\n");
- if (ata_busy_sleep(ap, ATA_TMOUT_CDB_QUICK, ATA_TMOUT_CDB)) {
- qc->err_mask |= AC_ERR_TIMEOUT;
- goto err_out;
- }
-
- /* make sure DRQ is set */
- status = ata_chk_status(ap);
- if ((status & (ATA_BUSY | ATA_DRQ)) != ATA_DRQ) {
- qc->err_mask |= AC_ERR_HSM;
- goto err_out;
- }
-
- /* send SCSI cdb */
- DPRINTK("send cdb\n");
- WARN_ON(qc->dev->cdb_len < 12);
-
- if (qc->tf.protocol == ATA_PROT_ATAPI_DMA ||
- qc->tf.protocol == ATA_PROT_ATAPI_NODATA) {
- unsigned long flags;
-
- /* Once we're done issuing command and kicking bmdma,
- * irq handler takes over. To not lose irq, we need
- * to clear NOINTR flag before sending cdb, but
- * interrupt handler shouldn't be invoked before we're
- * finished. Hence, the following locking.
- */
- spin_lock_irqsave(&ap->host_set->lock, flags);
-#warning FIXME
- /* ap->flags &= ~ATA_FLAG_NOINTR; */
- ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1);
- if (qc->tf.protocol == ATA_PROT_ATAPI_DMA)
- ap->ops->bmdma_start(qc); /* initiate bmdma */
- spin_unlock_irqrestore(&ap->host_set->lock, flags);
- } else {
- ata_data_xfer(ap, qc->cdb, qc->dev->cdb_len, 1);
-
- /* PIO commands are handled by polling */
- ap->hsm_task_state = HSM_ST;
- ata_port_queue_task(ap, ata_pio_task, ap, 0);
- }
-
- return;
-
-err_out:
- ata_poll_qc_complete(qc);
-}
-
-/**
* ata_qc_timeout - Handle timeout of queued command
* @qc: Command that timed out
*
prev parent reply other threads:[~2006-03-13 7:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-10 15:31 [PATCH 0/5] libata-dev: irq-pio minor fixes Albert Lee
2006-03-10 15:38 ` [PATCH 1/5] libata-dev: Add back missing dev->cdb_len = 16 Albert Lee
2006-03-10 15:43 ` [PATCH 2/5] libata-dev: Make dev->id dynamically allocated Albert Lee
2006-03-10 15:55 ` [PATCH 5/5] libata-dev: Add back irq-pio patches, etc Albert Lee
2006-03-12 0:27 ` [PATCH 0/5] libata-dev: irq-pio minor fixes Jeff Garzik
2006-03-13 7:12 ` Albert Lee
2006-03-13 7:17 ` Tejun Heo
2006-03-13 7:20 ` [PATCH 0/3] libata-dev: irq-pio minor fixes (respin) Albert Lee
2006-03-13 7:25 ` [PATCH 1/3] libata-dev: Remove trailing whitespaces Albert Lee
2006-03-13 7:48 ` Jeff Garzik
2006-03-13 7:27 ` [PATCH 2/3] libata-dev: Fix merge problem with upstream Albert Lee
2006-03-13 7:28 ` Albert Lee [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44151F32.8050607@tw.ibm.com \
--to=albertcc@tw.ibm.com \
--cc=albertl@mail.com \
--cc=dwm@maxeymade.com \
--cc=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.