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;
15 enum mmc_packed_type {
20 #define mmc_packed_cmd(type) ((type) != MMC_PACKED_NONE)
21 #define mmc_packed_wr(type) ((type) == MMC_PACKED_WRITE)
24 struct list_head list;
32 struct mmc_queue_req {
34 struct mmc_blk_request brq;
35 struct scatterlist *sg;
37 struct scatterlist *bounce_sg;
38 unsigned int bounce_sg_len;
39 struct mmc_async_req mmc_active;
40 enum mmc_packed_type cmd_type;
41 struct mmc_packed *packed;
45 struct mmc_card *card;
46 struct task_struct *thread;
47 struct semaphore thread_sem;
49 #define MMC_QUEUE_SUSPENDED (1 << 0)
50 #define MMC_QUEUE_NEW_REQUEST (1 << 1)
52 int (*issue_fn)(struct mmc_queue *, struct request *);
54 struct request_queue *queue;
55 struct mmc_queue_req mqrq[2];
56 struct mmc_queue_req *mqrq_cur;
57 struct mmc_queue_req *mqrq_prev;
60 extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
62 extern void mmc_cleanup_queue(struct mmc_queue *);
63 extern void mmc_queue_suspend(struct mmc_queue *);
64 extern void mmc_queue_resume(struct mmc_queue *);
66 extern unsigned int mmc_queue_map_sg(struct mmc_queue *,
67 struct mmc_queue_req *);
68 extern void mmc_queue_bounce_pre(struct mmc_queue_req *);
69 extern void mmc_queue_bounce_post(struct mmc_queue_req *);
71 extern int mmc_packed_init(struct mmc_queue *, struct mmc_card *);
72 extern void mmc_packed_clean(struct mmc_queue *);