Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 139427
b: refs/heads/master
c: 7526efa
h: refs/heads/master
i:
  139425: 59d17dc
  139423: db1f0bb
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Mar 31, 2009
1 parent 3873fa4 commit c9b5efa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a6d67ffa7dfe9515d8f2051a76b14c82b748475a
refs/heads/master: 7526efaafdc835b8d6b22aa1a302e14651373908
7 changes: 3 additions & 4 deletions trunk/drivers/ide/trm290.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ static int trm290_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
if (cmd->tf_flags & IDE_TFLAG_WRITE) {
#ifdef TRM290_NO_DMA_WRITES
/* always use PIO for writes */
trm290_prepare_drive(drive, 0); /* select PIO xfer */
return 1;
#endif
rw = 1;
Expand All @@ -195,11 +194,8 @@ static int trm290_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)
if (count == 0) {
ide_map_sg(drive, cmd);
/* try PIO instead of DMA */
trm290_prepare_drive(drive, 0); /* select PIO xfer */
return 1;
}
/* select DMA xfer */
trm290_prepare_drive(drive, 1);
outl(hwif->dmatable_dma | rw, hwif->dma_base);
drive->waiting_for_dma = 1;
/* start DMA */
Expand All @@ -209,6 +205,7 @@ static int trm290_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd)

static void trm290_dma_start(ide_drive_t *drive)
{
trm290_prepare_drive(drive, 1);
}

static int trm290_dma_end(ide_drive_t *drive)
Expand All @@ -219,6 +216,8 @@ static int trm290_dma_end(ide_drive_t *drive)

status = inw(drive->hwif->dma_base + 2);

trm290_prepare_drive(drive, 0);

return status != 0x00ff;
}

Expand Down

0 comments on commit c9b5efa

Please sign in to comment.