]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/mmc/card/queue.h
mmc: block: add member in mmc queue struct to hold request data
[mirror_ubuntu-artful-kernel.git] / drivers / mmc / card / queue.h
1 #ifndef MMC_QUEUE_H
2 #define MMC_QUEUE_H
3
4 struct request;
5 struct task_struct;
6
7 struct mmc_blk_request {
8 struct mmc_request mrq;
9 struct mmc_command sbc;
10 struct mmc_command cmd;
11 struct mmc_command stop;
12 struct mmc_data data;
13 };
14
15 struct mmc_queue_req {
16 struct request *req;
17 struct mmc_blk_request brq;
18 struct scatterlist *sg;
19 char *bounce_buf;
20 struct scatterlist *bounce_sg;
21 unsigned int bounce_sg_len;
22 };
23
24 struct mmc_queue {
25 struct mmc_card *card;
26 struct task_struct *thread;
27 struct semaphore thread_sem;
28 unsigned int flags;
29 int (*issue_fn)(struct mmc_queue *, struct request *);
30 void *data;
31 struct request_queue *queue;
32 struct mmc_queue_req mqrq[1];
33 struct mmc_queue_req *mqrq_cur;
34 };
35
36 extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
37 const char *);
38 extern void mmc_cleanup_queue(struct mmc_queue *);
39 extern void mmc_queue_suspend(struct mmc_queue *);
40 extern void mmc_queue_resume(struct mmc_queue *);
41
42 extern unsigned int mmc_queue_map_sg(struct mmc_queue *,
43 struct mmc_queue_req *);
44 extern void mmc_queue_bounce_pre(struct mmc_queue_req *);
45 extern void mmc_queue_bounce_post(struct mmc_queue_req *);
46
47 #endif