libata-sff: add ata_sff_queue_work() & ata_sff_queue_delayed_work()
This patch adds ata_sff_queue_work() & ata_sff_queue_delayed_work() routine in libata-sff.c file. This routine can be used by ata drivers to use ata_sff_wq. Signed-off-by: Viresh Kumar <viresh.kumar@st.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
This commit is contained in:
parent
64a3903d08
commit
64b9759425
|
@ -1302,6 +1302,18 @@ fsm_start:
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ata_sff_hsm_move);
|
EXPORT_SYMBOL_GPL(ata_sff_hsm_move);
|
||||||
|
|
||||||
|
void ata_sff_queue_work(struct work_struct *work)
|
||||||
|
{
|
||||||
|
queue_work(ata_sff_wq, work);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(ata_sff_queue_work);
|
||||||
|
|
||||||
|
void ata_sff_queue_delayed_work(struct delayed_work *dwork, unsigned long delay)
|
||||||
|
{
|
||||||
|
queue_delayed_work(ata_sff_wq, dwork, delay);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(ata_sff_queue_delayed_work);
|
||||||
|
|
||||||
void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay)
|
void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay)
|
||||||
{
|
{
|
||||||
struct ata_port *ap = link->ap;
|
struct ata_port *ap = link->ap;
|
||||||
|
@ -1311,8 +1323,7 @@ void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay)
|
||||||
ap->sff_pio_task_link = link;
|
ap->sff_pio_task_link = link;
|
||||||
|
|
||||||
/* may fail if ata_sff_flush_pio_task() in progress */
|
/* may fail if ata_sff_flush_pio_task() in progress */
|
||||||
queue_delayed_work(ata_sff_wq, &ap->sff_pio_task,
|
ata_sff_queue_delayed_work(&ap->sff_pio_task, msecs_to_jiffies(delay));
|
||||||
msecs_to_jiffies(delay));
|
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(ata_sff_queue_pio_task);
|
EXPORT_SYMBOL_GPL(ata_sff_queue_pio_task);
|
||||||
|
|
||||||
|
|
|
@ -1610,6 +1610,9 @@ extern void ata_sff_irq_on(struct ata_port *ap);
|
||||||
extern void ata_sff_irq_clear(struct ata_port *ap);
|
extern void ata_sff_irq_clear(struct ata_port *ap);
|
||||||
extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
|
extern int ata_sff_hsm_move(struct ata_port *ap, struct ata_queued_cmd *qc,
|
||||||
u8 status, int in_wq);
|
u8 status, int in_wq);
|
||||||
|
extern void ata_sff_queue_work(struct work_struct *work);
|
||||||
|
extern void ata_sff_queue_delayed_work(struct delayed_work *dwork,
|
||||||
|
unsigned long delay);
|
||||||
extern void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay);
|
extern void ata_sff_queue_pio_task(struct ata_link *link, unsigned long delay);
|
||||||
extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc);
|
extern unsigned int ata_sff_qc_issue(struct ata_queued_cmd *qc);
|
||||||
extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc);
|
extern bool ata_sff_qc_fill_rtf(struct ata_queued_cmd *qc);
|
||||||
|
|
Loading…
Reference in a new issue