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
;
41 struct mmc_card
*card
;
42 struct task_struct
*thread
;
43 struct semaphore thread_sem
;
46 struct mmc_blk_data
*blkdata
;
47 struct request_queue
*queue
;
48 struct mmc_queue_req
*mqrq
;
54 extern int mmc_queue_alloc_shared_queue(struct mmc_card
*card
);
55 extern void mmc_queue_free_shared_queue(struct mmc_card
*card
);
56 extern int mmc_init_queue(struct mmc_queue
*, struct mmc_card
*, spinlock_t
*,
58 extern void mmc_cleanup_queue(struct mmc_queue
*);
59 extern void mmc_queue_suspend(struct mmc_queue
*);
60 extern void mmc_queue_resume(struct mmc_queue
*);
62 extern unsigned int mmc_queue_map_sg(struct mmc_queue
*,
63 struct mmc_queue_req
*);
64 extern void mmc_queue_bounce_pre(struct mmc_queue_req
*);
65 extern void mmc_queue_bounce_post(struct mmc_queue_req
*);
67 extern int mmc_access_rpmb(struct mmc_queue
*);
69 extern struct mmc_queue_req
*mmc_queue_req_find(struct mmc_queue
*,
71 extern void mmc_queue_req_free(struct mmc_queue
*, struct mmc_queue_req
*);