ide-atapi: remove timeout arg to ide_issue_pc
authorBorislav Petkov <petkovbb@googlemail.com>
Fri, 2 Jan 2009 15:12:56 +0000 (16:12 +0100)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Fri, 2 Jan 2009 15:12:56 +0000 (16:12 +0100)
There should be no functionality change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/ide-atapi.c
drivers/ide/ide-floppy.c
drivers/ide/ide-tape.c
include/linux/ide.h

index fa7a70a3f24c008ba607ff4a082a99b648d38161..c470dbb155ca966dadfdfe57ac649c1406283a79 100644 (file)
@@ -562,11 +562,12 @@ static ide_startstop_t ide_transfer_pc(ide_drive_t *drive)
        return ide_started;
 }
 
-ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout)
+ide_startstop_t ide_issue_pc(ide_drive_t *drive)
 {
        struct ide_atapi_pc *pc;
        ide_hwif_t *hwif = drive->hwif;
        ide_expiry_t *expiry = NULL;
+       unsigned int timeout;
        u32 tf_flags;
        u16 bcount;
 
@@ -574,6 +575,7 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout)
                tf_flags = IDE_TFLAG_OUT_NSECT | IDE_TFLAG_OUT_LBAL;
                bcount = ide_cd_get_xferlen(hwif->hwgroup->rq);
                expiry = ide_cd_expiry;
+               timeout = ATAPI_WAIT_PC;
 
                if (drive->dma)
                        drive->dma = !hwif->dma_ops->dma_setup(drive);
@@ -600,6 +602,9 @@ ide_startstop_t ide_issue_pc(ide_drive_t *drive, unsigned int timeout)
 
                if (!drive->dma)
                        pc->flags &= ~PC_FLAG_DMA_OK;
+
+               timeout = (drive->media == ide_floppy) ? WAIT_FLOPPY_CMD
+                                                      : WAIT_TAPE_CMD;
        }
 
        ide_pktcmd_tf_load(drive, tf_flags, bcount, drive->dma);
index fdec729d0e49d3c65155b12b5d5e6a1bbacb5d14..0a48e2dc53a281c2e7757ade400c700c02df609c 100644 (file)
@@ -197,7 +197,7 @@ static ide_startstop_t idefloppy_issue_pc(ide_drive_t *drive,
 
        pc->retries++;
 
-       return ide_issue_pc(drive, WAIT_FLOPPY_CMD);
+       return ide_issue_pc(drive);
 }
 
 void ide_floppy_create_read_capacity_cmd(struct ide_atapi_pc *pc)
index ac9e29a4991f5f31485f29e2e53f62418a0ddaa5..5d2aa22cd6e471617176ab38624f5b164ccb3f09 100644 (file)
@@ -694,7 +694,7 @@ static ide_startstop_t idetape_issue_pc(ide_drive_t *drive,
 
        pc->retries++;
 
-       return ide_issue_pc(drive, WAIT_TAPE_CMD);
+       return ide_issue_pc(drive);
 }
 
 /* A mode sense command is used to "sense" tape parameters. */
index ad57a44929414c6d2f6d522ab2848b0a18c05239..db5ef8ae1ab95b342ecca1e5aed16f19d3e58085 100644 (file)
@@ -1250,7 +1250,7 @@ int ide_cd_expiry(ide_drive_t *);
 
 int ide_cd_get_xferlen(struct request *);
 
-ide_startstop_t ide_issue_pc(ide_drive_t *, unsigned int);
+ide_startstop_t ide_issue_pc(ide_drive_t *);
 
 ide_startstop_t do_rw_taskfile(ide_drive_t *, ide_task_t *);