blob: 6223ef8dc9cd08e6b7468a286b3e43fcb96ac26f [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
Adrian Hunterd09408a2011-06-23 13:40:28 +030022extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
23 const char *);
Linus Torvalds1da177e2005-04-16 15:20:36 -070024extern void mmc_cleanup_queue(struct mmc_queue *);
25extern void mmc_queue_suspend(struct mmc_queue *);
26extern void mmc_queue_resume(struct mmc_queue *);
27
Pierre Ossman98ccf142007-05-12 00:26:16 +020028extern unsigned int mmc_queue_map_sg(struct mmc_queue *);
29extern void mmc_queue_bounce_pre(struct mmc_queue *);
30extern void mmc_queue_bounce_post(struct mmc_queue *);
31
Linus Torvalds1da177e2005-04-16 15:20:36 -070032#endif