ide: pass command to ide_map_sg()
[deliverable/linux.git] / drivers / ide / ide-disk.c
index d8caa65ca7a50d8cc2faaefc435cb2c8ea2f6622..4b32c4eb7b82f8a890d7f2d684881466a1bcf682 100644 (file)
@@ -99,11 +99,6 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *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,
@@ -156,6 +151,11 @@ static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq,
        ide_tf_set_cmd(drive, &cmd, dma);
        cmd.rq = rq;
 
+       if (dma == 0) {
+               ide_init_sg_cmd(&cmd, nsectors);
+               ide_map_sg(drive, &cmd);
+       }
+
        rc = do_rw_taskfile(drive, &cmd);
 
        if (rc == ide_stopped && dma) {
This page took 0.024161 seconds and 5 git commands to generate.