Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76271
b: refs/heads/master
c: 7b90599
h: refs/heads/master
i:
  76269: 905acbe
  76267: a3c67b1
  76263: 60a4a7a
  76255: 1948a05
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 25, 2008
1 parent 3ca2440 commit 51394d2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 26 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: 23b1bd459c9e8a925381960f0b69ac85468c3af1
refs/heads/master: 7b905994ce0bd332afc5ebc30ce9afa60d23c6e2
25 changes: 11 additions & 14 deletions trunk/drivers/ide/ide-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -827,22 +827,19 @@ int ide_set_dma(ide_drive_t *drive)
ide_hwif_t *hwif = drive->hwif;
int rc;

rc = ide_dma_check(drive);
/*
* Force DMAing for the beginning of the check.
* Some chipsets appear to do interesting
* things, if not checked and cleared.
* PARANOIA!!!
*/
hwif->dma_off_quietly(drive);

switch(rc) {
case -1: /* DMA needs to be disabled */
hwif->dma_off_quietly(drive);
return -1;
case 0: /* DMA needs to be enabled */
return hwif->ide_dma_on(drive);
case 1: /* DMA setting cannot be changed */
break;
default:
BUG();
break;
}
rc = ide_dma_check(drive);
if (rc)
return rc;

return rc;
return hwif->ide_dma_on(drive);
}

#ifdef CONFIG_BLK_DEV_IDEDMA_PCI
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ide/ide-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ static ide_startstop_t ide_start_power_step(ide_drive_t *drive, struct request *
*/
if (drive->hwif->ide_dma_on == NULL)
break;
drive->hwif->dma_off_quietly(drive);
/*
* TODO: respect ->using_dma setting
*/
Expand Down
10 changes: 1 addition & 9 deletions trunk/drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,16 +833,8 @@ static void probe_hwif(ide_hwif_t *hwif)

drive->nice1 = 1;

if (hwif->ide_dma_on) {
/*
* Force DMAing for the beginning of the check.
* Some chipsets appear to do interesting
* things, if not checked and cleared.
* PARANOIA!!!
*/
hwif->dma_off_quietly(drive);
if (hwif->ide_dma_on)
ide_set_dma(drive);
}
}
}

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,6 @@ int set_using_dma(ide_drive_t *drive, int arg)
err = 0;

if (arg) {
hwif->dma_off_quietly(drive);
if (ide_set_dma(drive))
err = -EIO;
} else
Expand Down

0 comments on commit 51394d2

Please sign in to comment.