queue.h 820 B

1234567891011121314151617181920212223242526272829303132
  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 task_struct *thread;
  8. struct semaphore thread_sem;
  9. unsigned int flags;
  10. struct request *req;
  11. int (*prep_fn)(struct mmc_queue *, struct request *);
  12. int (*issue_fn)(struct mmc_queue *, struct request *);
  13. void *data;
  14. struct request_queue *queue;
  15. struct scatterlist *sg;
  16. };
  17. struct mmc_io_request {
  18. struct request *rq;
  19. int num;
  20. struct mmc_command selcmd; /* mmc_queue private */
  21. struct mmc_command cmd[4]; /* max 4 commands */
  22. };
  23. extern int mmc_init_queue(struct mmc_queue *, struct mmc_card *, spinlock_t *);
  24. extern void mmc_cleanup_queue(struct mmc_queue *);
  25. extern void mmc_queue_suspend(struct mmc_queue *);
  26. extern void mmc_queue_resume(struct mmc_queue *);
  27. #endif