mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
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>
This commit is contained in:
parent
d7b174500e
commit
442eacc362
2 changed files with 11 additions and 15 deletions
|
@ -1480,7 +1480,7 @@ unsigned long ata_id_xfermask(const u16 *id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ata_port_queue_task - Queue port_task
|
* ata_pio_queue_task - Queue port_task
|
||||||
* @ap: The ata_port to queue port_task for
|
* @ap: The ata_port to queue port_task for
|
||||||
* @fn: workqueue function to be scheduled
|
* @fn: workqueue function to be scheduled
|
||||||
* @data: data for @fn to use
|
* @data: data for @fn to use
|
||||||
|
@ -1492,16 +1492,15 @@ unsigned long ata_id_xfermask(const u16 *id)
|
||||||
* one task is active at any given time.
|
* one task is active at any given time.
|
||||||
*
|
*
|
||||||
* libata core layer takes care of synchronization between
|
* libata core layer takes care of synchronization between
|
||||||
* port_task and EH. ata_port_queue_task() may be ignored for EH
|
* port_task and EH. ata_pio_queue_task() may be ignored for EH
|
||||||
* synchronization.
|
* synchronization.
|
||||||
*
|
*
|
||||||
* LOCKING:
|
* LOCKING:
|
||||||
* Inherited from caller.
|
* Inherited from caller.
|
||||||
*/
|
*/
|
||||||
void ata_port_queue_task(struct ata_port *ap, work_func_t fn, void *data,
|
static void ata_pio_queue_task(struct ata_port *ap, void *data,
|
||||||
unsigned long delay)
|
unsigned long delay)
|
||||||
{
|
{
|
||||||
PREPARE_DELAYED_WORK(&ap->port_task, fn);
|
|
||||||
ap->port_task_data = data;
|
ap->port_task_data = data;
|
||||||
|
|
||||||
/* may fail if ata_port_flush_task() in progress */
|
/* may fail if ata_port_flush_task() in progress */
|
||||||
|
@ -5618,7 +5617,7 @@ fsm_start:
|
||||||
msleep(2);
|
msleep(2);
|
||||||
status = ata_busy_wait(ap, ATA_BUSY, 10);
|
status = ata_busy_wait(ap, ATA_BUSY, 10);
|
||||||
if (status & ATA_BUSY) {
|
if (status & ATA_BUSY) {
|
||||||
ata_port_queue_task(ap, ata_pio_task, qc, ATA_SHORT_PAUSE);
|
ata_pio_queue_task(ap, qc, ATA_SHORT_PAUSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6041,7 +6040,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
ap->hsm_task_state = HSM_ST_LAST;
|
ap->hsm_task_state = HSM_ST_LAST;
|
||||||
|
|
||||||
if (qc->tf.flags & ATA_TFLAG_POLLING)
|
if (qc->tf.flags & ATA_TFLAG_POLLING)
|
||||||
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
ata_pio_queue_task(ap, qc, 0);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -6063,7 +6062,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
if (qc->tf.flags & ATA_TFLAG_WRITE) {
|
if (qc->tf.flags & ATA_TFLAG_WRITE) {
|
||||||
/* PIO data out protocol */
|
/* PIO data out protocol */
|
||||||
ap->hsm_task_state = HSM_ST_FIRST;
|
ap->hsm_task_state = HSM_ST_FIRST;
|
||||||
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
ata_pio_queue_task(ap, qc, 0);
|
||||||
|
|
||||||
/* always send first data block using
|
/* always send first data block using
|
||||||
* the ata_pio_task() codepath.
|
* the ata_pio_task() codepath.
|
||||||
|
@ -6073,7 +6072,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
ap->hsm_task_state = HSM_ST;
|
ap->hsm_task_state = HSM_ST;
|
||||||
|
|
||||||
if (qc->tf.flags & ATA_TFLAG_POLLING)
|
if (qc->tf.flags & ATA_TFLAG_POLLING)
|
||||||
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
ata_pio_queue_task(ap, qc, 0);
|
||||||
|
|
||||||
/* if polling, ata_pio_task() handles the rest.
|
/* if polling, ata_pio_task() handles the rest.
|
||||||
* otherwise, interrupt handler takes over from here.
|
* otherwise, interrupt handler takes over from here.
|
||||||
|
@ -6094,7 +6093,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
/* send cdb by polling if no cdb interrupt */
|
/* send cdb by polling if no cdb interrupt */
|
||||||
if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) ||
|
if ((!(qc->dev->flags & ATA_DFLAG_CDB_INTR)) ||
|
||||||
(qc->tf.flags & ATA_TFLAG_POLLING))
|
(qc->tf.flags & ATA_TFLAG_POLLING))
|
||||||
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
ata_pio_queue_task(ap, qc, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ATAPI_PROT_DMA:
|
case ATAPI_PROT_DMA:
|
||||||
|
@ -6106,7 +6105,7 @@ unsigned int ata_qc_issue_prot(struct ata_queued_cmd *qc)
|
||||||
|
|
||||||
/* send cdb by polling if no cdb interrupt */
|
/* send cdb by polling if no cdb interrupt */
|
||||||
if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
|
if (!(qc->dev->flags & ATA_DFLAG_CDB_INTR))
|
||||||
ata_port_queue_task(ap, ata_pio_task, qc, 0);
|
ata_pio_queue_task(ap, qc, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -6722,7 +6721,7 @@ struct ata_port *ata_port_alloc(struct ata_host *host)
|
||||||
ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN;
|
ap->msg_enable = ATA_MSG_DRV | ATA_MSG_ERR | ATA_MSG_WARN;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
INIT_DELAYED_WORK(&ap->port_task, NULL);
|
INIT_DELAYED_WORK(&ap->port_task, ata_pio_task);
|
||||||
INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug);
|
INIT_DELAYED_WORK(&ap->hotplug_task, ata_scsi_hotplug);
|
||||||
INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);
|
INIT_WORK(&ap->scsi_rescan_task, ata_scsi_dev_rescan);
|
||||||
INIT_LIST_HEAD(&ap->eh_done_q);
|
INIT_LIST_HEAD(&ap->eh_done_q);
|
||||||
|
@ -7599,7 +7598,6 @@ EXPORT_SYMBOL_GPL(ata_wait_register);
|
||||||
EXPORT_SYMBOL_GPL(ata_busy_sleep);
|
EXPORT_SYMBOL_GPL(ata_busy_sleep);
|
||||||
EXPORT_SYMBOL_GPL(ata_wait_after_reset);
|
EXPORT_SYMBOL_GPL(ata_wait_after_reset);
|
||||||
EXPORT_SYMBOL_GPL(ata_wait_ready);
|
EXPORT_SYMBOL_GPL(ata_wait_ready);
|
||||||
EXPORT_SYMBOL_GPL(ata_port_queue_task);
|
|
||||||
EXPORT_SYMBOL_GPL(ata_scsi_ioctl);
|
EXPORT_SYMBOL_GPL(ata_scsi_ioctl);
|
||||||
EXPORT_SYMBOL_GPL(ata_scsi_queuecmd);
|
EXPORT_SYMBOL_GPL(ata_scsi_queuecmd);
|
||||||
EXPORT_SYMBOL_GPL(ata_scsi_slave_config);
|
EXPORT_SYMBOL_GPL(ata_scsi_slave_config);
|
||||||
|
|
|
@ -847,8 +847,6 @@ extern int ata_busy_sleep(struct ata_port *ap,
|
||||||
unsigned long timeout_pat, unsigned long timeout);
|
unsigned long timeout_pat, unsigned long timeout);
|
||||||
extern void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline);
|
extern void ata_wait_after_reset(struct ata_port *ap, unsigned long deadline);
|
||||||
extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline);
|
extern int ata_wait_ready(struct ata_port *ap, unsigned long deadline);
|
||||||
extern void ata_port_queue_task(struct ata_port *ap, work_func_t fn,
|
|
||||||
void *data, unsigned long delay);
|
|
||||||
extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
|
extern u32 ata_wait_register(void __iomem *reg, u32 mask, u32 val,
|
||||||
unsigned long interval_msec,
|
unsigned long interval_msec,
|
||||||
unsigned long timeout_msec);
|
unsigned long timeout_msec);
|
||||||
|
|
Loading…
Add table
Reference in a new issue