Skip to content

Commit

Permalink
ide-atapi: remove timeout arg to ide_issue_pc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Borislav Petkov authored and Bartlomiej Zolnierkiewicz committed Jan 2, 2009
1 parent 65a3309 commit 28ad91d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
7 changes: 6 additions & 1 deletion drivers/ide/ide-atapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,18 +562,20 @@ 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;

if (dev_is_idecd(drive)) {
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);
Expand All @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/ide-floppy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion drivers/ide/ide-tape.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion include/linux/ide.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

Expand Down

0 comments on commit 28ad91d

Please sign in to comment.