| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #ifndef MMC_QUEUE_H | 
|  | 2 | #define MMC_QUEUE_H | 
|  | 3 |  | 
|  | 4 | struct request; | 
|  | 5 | struct task_struct; | 
|  | 6 |  | 
| Per Forlin | 97868a2 | 2011-07-09 17:12:36 -0400 | [diff] [blame] | 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; | 
|  | 12 | struct mmc_data		data; | 
|  | 13 | }; | 
|  | 14 |  | 
|  | 15 | struct mmc_queue_req { | 
|  | 16 | struct request		*req; | 
|  | 17 | struct mmc_blk_request	brq; | 
|  | 18 | struct scatterlist	*sg; | 
|  | 19 | char			*bounce_buf; | 
|  | 20 | struct scatterlist	*bounce_sg; | 
|  | 21 | unsigned int		bounce_sg_len; | 
| Per Forlin | ee8a43a | 2011-07-01 18:55:33 +0200 | [diff] [blame] | 22 | struct mmc_async_req	mmc_active; | 
| Per Forlin | 97868a2 | 2011-07-09 17:12:36 -0400 | [diff] [blame] | 23 | }; | 
|  | 24 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 25 | struct mmc_queue { | 
|  | 26 | struct mmc_card		*card; | 
| Christoph Hellwig | 87598a2 | 2006-11-13 20:23:52 +0100 | [diff] [blame] | 27 | struct task_struct	*thread; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 28 | struct semaphore	thread_sem; | 
|  | 29 | unsigned int		flags; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | int			(*issue_fn)(struct mmc_queue *, struct request *); | 
|  | 31 | void			*data; | 
|  | 32 | struct request_queue	*queue; | 
| Per Forlin | 04296b7 | 2011-07-01 18:55:31 +0200 | [diff] [blame] | 33 | struct mmc_queue_req	mqrq[2]; | 
| Per Forlin | 97868a2 | 2011-07-09 17:12:36 -0400 | [diff] [blame] | 34 | struct mmc_queue_req	*mqrq_cur; | 
| Per Forlin | 04296b7 | 2011-07-01 18:55:31 +0200 | [diff] [blame] | 35 | struct mmc_queue_req	*mqrq_prev; | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | }; | 
|  | 37 |  | 
| Adrian Hunter | d09408a | 2011-06-23 13:40:28 +0300 | [diff] [blame] | 38 | extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *, | 
|  | 39 | const char *); | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 40 | extern void mmc_cleanup_queue(struct mmc_queue *); | 
|  | 41 | extern void mmc_queue_suspend(struct mmc_queue *); | 
|  | 42 | extern void mmc_queue_resume(struct mmc_queue *); | 
|  | 43 |  | 
| Per Forlin | 97868a2 | 2011-07-09 17:12:36 -0400 | [diff] [blame] | 44 | extern unsigned int mmc_queue_map_sg(struct mmc_queue *, | 
|  | 45 | struct mmc_queue_req *); | 
|  | 46 | extern void mmc_queue_bounce_pre(struct mmc_queue_req *); | 
|  | 47 | extern void mmc_queue_bounce_post(struct mmc_queue_req *); | 
| Pierre Ossman | 98ccf14 | 2007-05-12 00:26:16 +0200 | [diff] [blame] | 48 |  | 
| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | #endif |