ide: pass command to ide_map_sg()
[deliverable/linux.git] / drivers / ide / ide-io.c
index f59c709052d2b33442e4e704e61b178436f017ab..47404f5526f1e8b99ba84f7a80cec625dcb63fe9 100644 (file)
@@ -228,11 +228,11 @@ static ide_startstop_t do_special (ide_drive_t *drive)
        return ide_stopped;
 }
 
-void ide_map_sg(ide_drive_t *drive, struct request *rq)
+void ide_map_sg(ide_drive_t *drive, struct ide_cmd *cmd)
 {
        ide_hwif_t *hwif = drive->hwif;
-       struct ide_cmd *cmd = &hwif->cmd;
        struct scatterlist *sg = hwif->sg_table;
+       struct request *rq = cmd->rq;
 
        if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
                sg_init_one(sg, rq->buffer, rq->nr_sectors * SECTOR_SIZE);
@@ -273,7 +273,7 @@ static ide_startstop_t execute_drive_cmd (ide_drive_t *drive,
        if (cmd) {
                if (cmd->protocol == ATA_PROT_PIO) {
                        ide_init_sg_cmd(cmd, rq->nr_sectors);
-                       ide_map_sg(drive, rq);
+                       ide_map_sg(drive, cmd);
                }
 
                return do_rw_taskfile(drive, cmd);
This page took 0.024275 seconds and 5 git commands to generate.