mmc_queue.h 857 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef MMC_QUEUE_H
  2. #define MMC_QUEUE_H
  3. struct request;
  4. struct task_struct;
  5. struct mmc_queue {
  6. struct mmc_card *card;
  7. struct completion thread_complete;
  8. wait_queue_head_t thread_wq;
  9. struct semaphore thread_sem;
  10. unsigned int flags;
  11. struct request *req;
  12. int (*prep_fn)(struct mmc_queue *, struct request *);
  13. int (*issue_fn)(struct mmc_queue *, struct request *);
  14. void *data;
  15. struct request_queue *queue;
  16. struct scatterlist *sg;
  17. };
  18. struct mmc_io_request {
  19. struct request *rq;
  20. int num;
  21. struct mmc_command selcmd; /* mmc_queue private */
  22. struct mmc_command cmd[4]; /* max 4 commands */
  23. };
  24. extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *);
  25. extern void mmc_cleanup_queue(struct mmc_queue *);
  26. extern void mmc_queue_suspend(struct mmc_queue *);
  27. extern void mmc_queue_resume(struct mmc_queue *);
  28. #endif