diff options
author | David S. Miller <davem@davemloft.net> | 2009-02-03 03:15:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-02-03 03:15:35 -0500 |
commit | b3ff29d2ccfe3af065a9b393699a8fbf2abd1b15 (patch) | |
tree | 99e5b423473097756353d038f922b2623f3edd2a /drivers/ide/ide-io.c | |
parent | 1bded710a574f20d41bc9e7fb531301db282d623 (diff) | |
parent | fb53fde9762432d091dac209bdf4f3f850117c55 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/Kconfig
Diffstat (limited to 'drivers/ide/ide-io.c')
-rw-r--r-- | drivers/ide/ide-io.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c index cc163319dfbd..9ee51adf567f 100644 --- a/drivers/ide/ide-io.c +++ b/drivers/ide/ide-io.c | |||
@@ -418,11 +418,14 @@ void ide_map_sg(ide_drive_t *drive, struct request *rq) | |||
418 | ide_hwif_t *hwif = drive->hwif; | 418 | ide_hwif_t *hwif = drive->hwif; |
419 | struct scatterlist *sg = hwif->sg_table; | 419 | struct scatterlist *sg = hwif->sg_table; |
420 | 420 | ||
421 | if (rq->cmd_type != REQ_TYPE_ATA_TASKFILE) { | 421 | if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { |
422 | hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg); | ||
423 | } else { | ||
424 | sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE); | 422 | sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE); |
425 | hwif->sg_nents = 1; | 423 | hwif->sg_nents = 1; |
424 | } else if (!rq->bio) { | ||
425 | sg_init_one(sg, rq->data, rq->data_len); | ||
426 | hwif->sg_nents = 1; | ||
427 | } else { | ||
428 | hwif->sg_nents = blk_rq_map_sg(drive->queue, rq, sg); | ||
426 | } | 429 | } |
427 | } | 430 | } |
428 | 431 | ||