blob: 64e66e0d4994a9176662354cd123fb0cee2315a0 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef MMC_QUEUE_H
2#define MMC_QUEUE_H
3
4struct request;
5struct task_struct;
6
7struct mmc_queue {
8 struct mmc_card *card;
Christoph Hellwig87598a22006-11-13 20:23:52 +01009 struct task_struct *thread;
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 struct semaphore thread_sem;
11 unsigned int flags;
12 struct request *req;
Linus Torvalds1da177e2005-04-16 15:20:36 -070013 int (*issue_fn)(struct mmc_queue *, struct request *);
14 void *data;
15 struct request_queue *queue;
16 struct scatterlist *sg;
Pierre Ossman98ccf142007-05-12 00:26:16 +020017 char *bounce_buf;
18 struct scatterlist *bounce_sg;
19 unsigned int bounce_sg_len;
Linus Torvalds1da177e2005-04-16 15:20:36 -070020};
21
Linus Torvalds1da177e2005-04-16 15:20:36 -070022extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *);
23extern void mmc_cleanup_queue(struct mmc_queue *);
24extern void mmc_queue_suspend(struct mmc_queue *);
25extern void mmc_queue_resume(struct mmc_queue *);
26
Pierre Ossman98ccf142007-05-12 00:26:16 +020027extern unsigned int mmc_queue_map_sg(struct mmc_queue *);
28extern void mmc_queue_bounce_pre(struct mmc_queue *);
29extern void mmc_queue_bounce_post(struct mmc_queue *);
30
Linus Torvalds1da177e2005-04-16 15:20:36 -070031#endif