diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-12-19 04:25:10 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2008-01-23 05:24:15 -0500 |
commit | 442eacc362c2576aac8ebfd41b99252e28e0f49c (patch) | |
tree | 4a40c47cb1c9d87830a04027323a26fe99541927 /drivers/ata | |
parent | d7b174500e5750099537c7f0bc4873f06b6c1b9a (diff) |
libata: make ata_port_queue_task() an internal function
ata_port_queue_task() served a single user: ata_pio_task()
Rename to ata_pio_queue_task() and un-export it, as nobody outside of
libata-core.c uses it.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata')
-rw-r--r-- | drivers/ata/libata-core.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 627703cba9a6..4020a1d3eb2c 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
@@ -1480,7 +1480,7 @@ unsigned long ata_id_xfermask(const u16 *id) | |||
1480 | } | 1480 | } |
1481 | 1481 | ||
1482 | /** | 1482 | /** |
1483 | * ata_port_queue_task - Queue port_task | 1483 | * ata_pio_queue_task - Queue port_task |
1484 | * @ap: The ata_port to queue port_task for | 1484 | * @ap: The ata_port to queue port_task for |
1485 | * @fn: workqueue function to be scheduled | 1485 | * @fn: workqueue function to be scheduled |
1486 | * @data: data for @fn to use | 1486 | * @data: data for @fn to use |
@@ -1492,16 +1492,15 @@ unsigned long ata_id_xfermask(const u16 *id) | |||
1492 | * one task is active at any given time. | 1492 | * one task is active at any given time. |
1493 | * | 1493 | * |
1494 | * libata core layer takes care of synchronization between | 1494 | * libata core layer takes care of synchronization between |
1495 | * port_task and EH. ata_port_queue_task() may be ignored for EH | 1495 | * port_task and EH. ata_pio_queue_task() may be ignored for EH |
1496 | * synchronization. | 1496 | * synchronization. |
1497 | * | 1497 | * |
1498 | * LOCKING: | 1498 | * LOCKING: |
1499 | * Inherited from caller. | 1499 | * Inherited from caller. |
1500 | */ | 1500 | */ |
1501 | void ata_port_queue_task(struct ata_port *ap, work_func_t fn, void *data, | 1501 | static void ata_pio_queue_task(struct ata_port *ap, void *data, |
1502 | unsigned long delay) | 1502 | unsigned long delay) |
1503 | { | 1503 | { |
1504 | PREPARE_DELAYED_WORK(&ap->port_task, fn); | ||
1505 | ap->port_task_data = data; | 1504 | ap->port_task_data = data; |
1506 | 1505 | ||
1507 | /* may fail if ata_port_flush_task() in progress */ | 1506 | /* may fail if ata_port_flush_task() in progress */ |
@@ -5618,7 +5617,7 @@ fsm_start: | |||
5618 | msleep(2); | 5617 | msleep(2); |
5619 | status = ata_busy_wait(ap, ATA_BUSY, 10); | 5618 | status = ata_busy_wait(ap, ATA_BUSY, 10); |
5620 | if (status & ATA_BUSY) { | 5619 | if (status & ATA_BUSY) { |
5621 | ata_port_queue_task(ap, ata_pio_task, qc, ATA_SHORT_PAUSE); | 5620 | ata_pio_queue_task(ap, qc, ATA_SHORT_PAUSE); |
5622 | return; | 5621 | return; |
5623 | } | 5622 | } |
5624 | } | 5623 | } |
@@ -6041,7 +6040,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
6041 | ap->hsm_task_state = HSM_ST_LAST; | 6040 | ap->hsm_task_state = HSM_ST_LAST; |
6042 | 6041 | ||
6043 | if (qc->tf.flags & ATA_TFLAG_POLLING) | 6042 | if (qc->tf.flags & ATA_TFLAG_POLLING) |
6044 | ata_port_queue_task(ap, ata_pio_task, qc, 0); | 6043 | ata_pio_queue_task(ap, qc, 0); |
6045 | 6044 | ||
6046 | break; | 6045 | break; |
6047 | 6046 | ||
@@ -6063,7 +6062,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
6063 | if (qc->tf.flags & ATA_TFLAG_WRITE) { | 6062 | if (qc->tf.flags & ATA_TFLAG_WRITE) { |
6064 | /* PIO data out protocol */ | 6063 | /* PIO data out protocol */ |
6065 | ap->hsm_task_state = HSM_ST_FIRST; | 6064 | ap->hsm_task_state = HSM_ST_FIRST; |
6066 | ata_port_queue_task(ap, ata_pio_task, qc, 0); | 6065 | ata_pio_queue_task(ap, qc, 0); |
6067 | 6066 | ||
6068 | /* always send first data block using | 6067 | /* always send first data block using |
6069 | * the ata_pio_task() codepath. | 6068 | * the ata_pio_task() codepath. |
@@ -6073,7 +6072,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
6073 | ap->hsm_task_state = HSM_ST; | 6072 | ap->hsm_task_state = HSM_ST; |
6074 | 6073 | ||
6075 | if (qc->tf.flags & ATA_TFLAG_POLLING) | 6074 | if (qc->tf.flags & ATA_TFLAG_POLLING) |
6076 | ata_port_queue_task(ap, ata_pio_task, qc, 0); | 6075 | ata_pio_queue_task(ap, qc, 0); |
6077 | 6076 | ||
6078 | /* if polling, ata_pio_task() handles the rest. | 6077 | /* if polling, ata_pio_task() handles the rest. |
6079 | * otherwise, interrupt handler takes over from here. | 6078 | * otherwise, interrupt handler takes over from here. |
@@ -6094,7 +6093,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
6094 | /* send cdb by polling if no cdb interrupt */ | 6093 | /* send cdb by polling if no cdb interrupt */ |
6095 | if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) || | 6094 | if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) || |
6096 | (qc->tf.flags & ATA_TFLAG_POLLING)) | 6095 | (qc->tf.flags & ATA_TFLAG_POLLING)) |
6097 | ata_port_queue_task(ap, ata_pio_task, qc, 0); | 6096 | ata_pio_queue_task(ap, qc, 0); |
6098 | break; | 6097 | break; |
6099 | 6098 | ||
6100 | case ATAPI_PROT_DMA: | 6099 | case ATAPI_PROT_DMA: |
@@ -6106,7 +6105,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc) | |||
6106 | 6105 | ||
6107 | /* send cdb by polling if no cdb interrupt */ | 6106 | /* send cdb by polling if no cdb interrupt */ |
6108 | if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) | 6107 | if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) |
6109 | ata_port_queue_task(ap, ata_pio_task, qc, 0); | 6108 | ata_pio_queue_task(ap, qc, 0); |
6110 | break; | 6109 | break; |
6111 | 6110 | ||
6112 | default: | 6111 | default: |
@@ -6722,7 +6721,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host) | |||
6722 | ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; | 6721 | ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN; |
6723 | #endif | 6722 | #endif |
6724 | 6723 | ||
6725 | INIT_DELAYED_WORK(&ap->port_task, NULL); | 6724 | INIT_DELAYED_WORK(&ap->port_task, ata_pio_task); |
6726 | INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug); | 6725 | INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug); |
6727 | INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan); | 6726 | INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan); |
6728 | INIT_LIST_HEAD(&ap->eh_done_q); | 6727 | INIT_LIST_HEAD(&ap->eh_done_q); |
@@ -7599,7 +7598,6 @@ EXPORT_SYMBOL_GPL(ata_wait_register); | |||
7599 | EXPORT_SYMBOL_GPL(ata_busy_sleep); | 7598 | EXPORT_SYMBOL_GPL(ata_busy_sleep); |
7600 | EXPORT_SYMBOL_GPL(ata_wait_after_reset); | 7599 | EXPORT_SYMBOL_GPL(ata_wait_after_reset); |
7601 | EXPORT_SYMBOL_GPL(ata_wait_ready); | 7600 | EXPORT_SYMBOL_GPL(ata_wait_ready); |
7602 | EXPORT_SYMBOL_GPL(ata_port_queue_task); | ||
7603 | EXPORT_SYMBOL_GPL(ata_scsi_ioctl); | 7601 | EXPORT_SYMBOL_GPL(ata_scsi_ioctl); |
7604 | EXPORT_SYMBOL_GPL(ata_scsi_queuecmd); | 7602 | EXPORT_SYMBOL_GPL(ata_scsi_queuecmd); |
7605 | EXPORT_SYMBOL_GPL(ata_scsi_slave_config); | 7603 | EXPORT_SYMBOL_GPL(ata_scsi_slave_config); |