[PATCH] libata: implement port_task

Implement port_task.  LLDD's can schedule a function to be executed
with context after specified delay.  libata core takes care of
synchronization against EH.  This is generalized form of pio_task and
packet_task which are tied to PIO hsm implementation.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
This commit is contained in:
Tejun Heo 2006-03-05 15:29:09 +09:00 committed by Jeff Garzik
parent d7fc3ca1cd
commit 86e45b6bd6
4 changed files with 84 additions and 0 deletions

View file

@ -388,6 +388,8 @@ struct ata_port {
struct ata_host_stats stats;
struct ata_host_set *host_set;
struct work_struct port_task;
struct work_struct packet_task;
struct work_struct pio_task;
@ -515,6 +517,8 @@ extern int ata_ratelimit(void);
extern unsigned int ata_busy_sleep(struct ata_port *ap,
unsigned long timeout_pat,
unsigned long timeout);
extern void ata_port_queue_task(struct ata_port *ap, void (*fn)(void *),
void *data, unsigned long delay);
/*
* Default driver ops implementations