4 static inline bool mmc_req_is_special(struct request *req)
6 return req && (req->cmd_flags & REQ_FLUSH || req_op(req) == REQ_OP_DISCARD);
12 struct mmc_blk_request {
13 struct mmc_request mrq;
14 struct mmc_command sbc;
15 struct mmc_command cmd;
16 struct mmc_command stop;
18 int retune_retry_done;
21 enum mmc_packed_type {
26 #define mmc_packed_cmd(type) ((type) != MMC_PACKED_NONE)
27 #define mmc_packed_wr(type) ((type) == MMC_PACKED_WRITE)
30 struct list_head list;
38 struct mmc_queue_req {
40 struct mmc_blk_request brq;
41 struct scatterlist *sg;
43 struct scatterlist *bounce_sg;
44 unsigned int bounce_sg_len;
45 struct mmc_async_req mmc_active;
46 enum mmc_packed_type cmd_type;
47 struct mmc_packed *packed;
51 struct mmc_card *card;
52 struct task_struct *thread;
53 struct semaphore thread_sem;
55 #define MMC_QUEUE_SUSPENDED (1 << 0)
56 #define MMC_QUEUE_NEW_REQUEST (1 << 1)
58 int (*issue_fn)(struct mmc_queue *, struct request *);
60 struct request_queue *queue;
61 struct mmc_queue_req mqrq[2];
62 struct mmc_queue_req *mqrq_cur;
63 struct mmc_queue_req *mqrq_prev;
66 extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
68 extern void mmc_cleanup_queue(struct mmc_queue *);
69 extern void mmc_queue_suspend(struct mmc_queue *);
70 extern void mmc_queue_resume(struct mmc_queue *);
72 extern unsigned int mmc_queue_map_sg(struct mmc_queue *,
73 struct mmc_queue_req *);
74 extern void mmc_queue_bounce_pre(struct mmc_queue_req *);
75 extern void mmc_queue_bounce_post(struct mmc_queue_req *);
77 extern int mmc_packed_init(struct mmc_queue *, struct mmc_card *);
78 extern void mmc_packed_clean(struct mmc_queue *);
80 extern int mmc_access_rpmb(struct mmc_queue *);