diff options
| author | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-30 23:57:05 -0500 |
|---|---|---|
| committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-05-30 23:57:05 -0500 |
| commit | 5bc65793cbf8da0d35f19ef025dda22887e79e80 (patch) | |
| tree | 8291998abd73055de6f487fafa174ee2a5d3afee /drivers/mmc/card/queue.c | |
| parent | 6edae708bf77e012d855a7e2c7766f211d234f4f (diff) | |
| parent | 3f0a6766e0cc5a577805732e5adb50a585c58175 (diff) | |
[SCSI] Merge up to linux-2.6 head
Conflicts:
drivers/scsi/jazz_esp.c
Same changes made by both SCSI and SPARC trees: problem with UTF-8
conversion in the copyright.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
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 2e77963db33..dd97bc79840 100644 --- a/drivers/mmc/card/queue.c +++ b/drivers/mmc/card/queue.c @@ -20,40 +20,21 @@ #define MMC_QUEUE_SUSPENDED (1 << 0) /* - * Prepare a MMC request. Essentially, this means passing the - * preparation off to the media driver. The media driver will - * create a mmc_io_request in req->special. + * Prepare a MMC request. This just filters out odd stuff. */ static int mmc_prep_request(struct request_queue *q, struct request *req) { - struct mmc_queue *mq = q->queuedata; - int ret = BLKPREP_KILL; - - if (blk_special_request(req)) { - /* - * Special commands already have the command - * blocks already setup in req->special. - */ - BUG_ON(!req->special); - - ret = BLKPREP_OK; - } else if (blk_fs_request(req) || blk_pc_request(req)) { - /* - * Block I/O requests need translating according - * to the protocol. - */ - ret = mq->prep_fn(mq, req); - } else { - /* - * Everything else is invalid. - */ + /* + * We only like normal block requests. + */ + if (!blk_fs_request(req) && !blk_pc_request(req)) { blk_dump_rq_flags(req, "MMC bad request"); + return BLKPREP_KILL; } - if (ret == BLKPREP_OK) - req->cmd_flags |= REQ_DONTPREP; + req->cmd_flags |= REQ_DONTPREP; - return ret; + return BLKPREP_OK; } static int mmc_queue_thread(void *d) |
