aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/queue.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/card/queue.h')
-rw-r--r--drivers/mmc/card/queue.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/mmc/card/queue.h b/drivers/mmc/card/queue.h
index d2a1eb4b9f9f..031bf6376c99 100644
--- a/drivers/mmc/card/queue.h
+++ b/drivers/mmc/card/queue.h
@@ -12,6 +12,23 @@ struct mmc_blk_request {
12 struct mmc_data data; 12 struct mmc_data data;
13}; 13};
14 14
15enum mmc_packed_type {
16 MMC_PACKED_NONE = 0,
17 MMC_PACKED_WRITE,
18};
19
20#define mmc_packed_cmd(type) ((type) != MMC_PACKED_NONE)
21#define mmc_packed_wr(type) ((type) == MMC_PACKED_WRITE)
22
23struct mmc_packed {
24 struct list_head list;
25 u32 cmd_hdr[1024];
26 unsigned int blocks;
27 u8 nr_entries;
28 u8 retries;
29 s16 idx_failure;
30};
31
15struct mmc_queue_req { 32struct mmc_queue_req {
16 struct request *req; 33 struct request *req;
17 struct mmc_blk_request brq; 34 struct mmc_blk_request brq;
@@ -20,6 +37,8 @@ struct mmc_queue_req {
20 struct scatterlist *bounce_sg; 37 struct scatterlist *bounce_sg;
21 unsigned int bounce_sg_len; 38 unsigned int bounce_sg_len;
22 struct mmc_async_req mmc_active; 39 struct mmc_async_req mmc_active;
40 enum mmc_packed_type cmd_type;
41 struct mmc_packed *packed;
23}; 42};
24 43
25struct mmc_queue { 44struct mmc_queue {
@@ -27,6 +46,9 @@ struct mmc_queue {
27 struct task_struct *thread; 46 struct task_struct *thread;
28 struct semaphore thread_sem; 47 struct semaphore thread_sem;
29 unsigned int flags; 48 unsigned int flags;
49#define MMC_QUEUE_SUSPENDED (1 << 0)
50#define MMC_QUEUE_NEW_REQUEST (1 << 1)
51
30 int (*issue_fn)(struct mmc_queue *, struct request *); 52 int (*issue_fn)(struct mmc_queue *, struct request *);
31 void *data; 53 void *data;
32 struct request_queue *queue; 54 struct request_queue *queue;
@@ -46,4 +68,7 @@ extern unsigned int mmc_queue_map_sg(struct mmc_queue *,
46extern void mmc_queue_bounce_pre(struct mmc_queue_req *); 68extern void mmc_queue_bounce_pre(struct mmc_queue_req *);
47extern void mmc_queue_bounce_post(struct mmc_queue_req *); 69extern void mmc_queue_bounce_post(struct mmc_queue_req *);
48 70
71extern int mmc_packed_init(struct mmc_queue *, struct mmc_card *);
72extern void mmc_packed_clean(struct mmc_queue *);
73
49#endif 74#endif