diff options
Diffstat (limited to 'drivers/mmc/card/queue.c')
-rw-r--r-- | drivers/mmc/card/queue.c | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/drivers/mmc/card/queue.c b/drivers/mmc/card/queue.c index 2e77963db334..dd97bc798409 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c | |||
@@ -20,40 +20,21 @@ | |||
20 | #define MMC_QUEUE_SUSPENDED (1 << 0) | 20 | #define MMC_QUEUE_SUSPENDED (1 << 0) |
21 | 21 | ||
22 | /* | 22 | /* |
23 | * Prepare a MMC request. Essentially, this means passing the | 23 | * Prepare a MMC request. This just filters out odd stuff. |
24 | * preparation off to the media driver. The media driver will | ||
25 | * create a mmc_io_request in req->special. | ||
26 | */ | 24 | */ |
27 | static int mmc_prep_request(struct request_queue *q, struct request *req) | 25 | static int mmc_prep_request(struct request_queue *q, struct request *req) |
28 | { | 26 | { |
29 | struct mmc_queue *mq = q->queuedata; | 27 | /* |
30 | int ret = BLKPREP_KILL; | 28 | * We only like normal block requests. |
31 | 29 | */ | |
32 | if (blk_special_request(req)) { | 30 | if (!blk_fs_request(req) && !blk_pc_request(req)) { |
33 | /* | ||
34 | * Special commands already have the command | ||
35 | * blocks already setup in req->special. | ||
36 | */ | ||
37 | BUG_ON(!req->special); | ||
38 | |||
39 | ret = BLKPREP_OK; | ||
40 | } else if (blk_fs_request(req) || blk_pc_request(req)) { | ||
41 | /* | ||
42 | * Block I/O requests need translating according | ||
43 | * to the protocol. | ||
44 | */ | ||
45 | ret = mq->prep_fn(mq, req); | ||
46 | } else { | ||
47 | /* | ||
48 | * Everything else is invalid. | ||
49 | */ | ||
50 | blk_dump_rq_flags(req, "MMC bad request"); | 31 | blk_dump_rq_flags(req, "MMC bad request"); |
32 | return BLKPREP_KILL; | ||
51 | } | 33 | } |
52 | 34 | ||
53 | if (ret == BLKPREP_OK) | 35 | req->cmd_flags |= REQ_DONTPREP; |
54 | req->cmd_flags |= REQ_DONTPREP; | ||
55 | 36 | ||
56 | return ret; | 37 | return BLKPREP_OK; |
57 | } | 38 | } |
58 | 39 | ||
59 | static int mmc_queue_thread(void *d) | 40 | static int mmc_queue_thread(void *d) |