4 #include <linux/types.h>
5 #include <linux/blkdev.h>
6 #include <linux/mmc/core.h>
7 #include <linux/mmc/host.h>
9 static inline bool mmc_req_is_special(struct request *req)
12 (req_op(req) == REQ_OP_FLUSH ||
13 req_op(req) == REQ_OP_DISCARD ||
14 req_op(req) == REQ_OP_SECURE_ERASE);
20 struct mmc_blk_request {
21 struct mmc_request mrq;
22 struct mmc_command sbc;
23 struct mmc_command cmd;
24 struct mmc_command stop;
26 int retune_retry_done;
29 struct mmc_queue_req {
31 struct mmc_blk_request brq;
32 struct scatterlist *sg;
34 struct scatterlist *bounce_sg;
35 unsigned int bounce_sg_len;
36 struct mmc_async_req areq;
40 struct mmc_card *card;
41 struct task_struct *thread;
42 struct semaphore thread_sem;
46 struct mmc_blk_data *blkdata;
47 struct request_queue *queue;
48 struct mmc_queue_req *mqrq;
49 struct mmc_queue_req *mqrq_cur;
50 struct mmc_queue_req *mqrq_prev;
54 extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *,
56 extern void mmc_cleanup_queue(struct mmc_queue *);
57 extern void mmc_queue_suspend(struct mmc_queue *);
58 extern void mmc_queue_resume(struct mmc_queue *);
60 extern unsigned int mmc_queue_map_sg(struct mmc_queue *,
61 struct mmc_queue_req *);
62 extern void mmc_queue_bounce_pre(struct mmc_queue_req *);
63 extern void mmc_queue_bounce_post(struct mmc_queue_req *);
65 extern int mmc_access_rpmb(struct mmc_queue *);