aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-disk.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:38 +0100
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-27 12:46:38 +0100
commitb6308ee0c55acd2e943d849773c9f0a49c516317 (patch)
treee56f59a7935fccdf0145ffd4638a066bf4ba1e17 /drivers/ide/ide-disk.c
parentadb1af9803d167091c2cb4de14014185054bfe2c (diff)
downloadkernel_samsung_smdk4412-b6308ee0c55acd2e943d849773c9f0a49c516317.zip
kernel_samsung_smdk4412-b6308ee0c55acd2e943d849773c9f0a49c516317.tar.gz
kernel_samsung_smdk4412-b6308ee0c55acd2e943d849773c9f0a49c516317.tar.bz2
ide: move command related fields from ide_hwif_t to struct ide_cmd
* Move command related fields from ide_hwif_t to struct ide_cmd. * Make ide_init_sg_cmd() take command and sectors number as arguments. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-disk.c')
-rw-r--r--drivers/ide/ide-disk.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index f1555dd..d00d807 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -104,14 +104,14 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
lba48 = 0;
}
- if (!dma) {
- ide_init_sg_cmd(drive, rq);
- ide_map_sg(drive, rq);
- }
-
memset(&cmd, 0, sizeof(cmd));
cmd.tf_flags = IDE_TFLAG_TF | IDE_TFLAG_DEVICE;
+ if (dma == 0) {
+ ide_init_sg_cmd(&cmd, nsectors);
+ ide_map_sg(drive, rq);
+ }
+
if (drive->dev_flags & IDE_DFLAG_LBA) {
if (lba48) {
pr_debug("%s: LBA=0x%012llx\n", drive->name,
@@ -170,7 +170,7 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
/* fallback to PIO */
cmd.tf_flags |= IDE_TFLAG_DMA_PIO_FALLBACK;
ide_tf_set_cmd(drive, &cmd, 0);
- ide_init_sg_cmd(drive, rq);
+ ide_init_sg_cmd(&cmd, nsectors);
rc = do_rw_taskfile(drive, &cmd);
}