diff options
author | Tejun Heo <tj@kernel.org> | 2009-04-18 18:00:42 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-04-28 01:37:29 -0400 |
commit | 8968932e54db35cf9d69cfbbd50c26dfaaa586c7 (patch) | |
tree | 3ed9e5441de92603ad60755b7f0a6129eef17c7d /drivers/ide | |
parent | 59a4f6f355fc718581ddcf1bb45a469d4756c035 (diff) |
ide-floppy: block pc always uses bio
Impact: remove unnecessary code path
Block pc requests always use bio and rq->data is always NULL. No need
to worry about !rq->bio cases in idefloppy_block_pc_cmd(). Note that
ide-atapi uses ide_pio_bytes() for bio PIO transfer which handle sg
fine.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/ide')
-rw-r--r-- | drivers/ide/ide-floppy.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/ide/ide-floppy.c b/drivers/ide/ide-floppy.c index 2b4868d95f8b..3b22e066287e 100644 --- a/drivers/ide/ide-floppy.c +++ b/drivers/ide/ide-floppy.c | |||
@@ -216,15 +216,13 @@ static void idefloppy_blockpc_cmd(struct ide_disk_obj *floppy, | |||
216 | ide_init_pc(pc); | 216 | ide_init_pc(pc); |
217 | memcpy(pc->c, rq->cmd, sizeof(pc->c)); | 217 | memcpy(pc->c, rq->cmd, sizeof(pc->c)); |
218 | pc->rq = rq; | 218 | pc->rq = rq; |
219 | if (rq->data_len && rq_data_dir(rq) == WRITE) | 219 | if (rq->data_len) { |
220 | pc->flags |= PC_FLAG_WRITING; | ||
221 | pc->buf = rq->data; | ||
222 | if (rq->bio) | ||
223 | pc->flags |= PC_FLAG_DMA_OK; | 220 | pc->flags |= PC_FLAG_DMA_OK; |
224 | /* | 221 | if (rq_data_dir(rq) == WRITE) |
225 | * possibly problematic, doesn't look like ide-floppy correctly | 222 | pc->flags |= PC_FLAG_WRITING; |
226 | * handled scattered requests if dma fails... | 223 | } |
227 | */ | 224 | /* pio will be performed by ide_pio_bytes() which handles sg fine */ |
225 | pc->buf = NULL; | ||
228 | pc->req_xfer = pc->buf_size = rq->data_len; | 226 | pc->req_xfer = pc->buf_size = rq->data_len; |
229 | } | 227 | } |
230 | 228 | ||