Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48815
b: refs/heads/master
c: 15b8548
h: refs/heads/master
i:
  48813: b4ac8c4
  48811: 46f678a
  48807: 6c7f498
  48799: 01b9c05
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 17, 2007
1 parent fc66fe8 commit 7563824
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 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: 73d4f7d5874b378fa622f156410ffba645c1ef40
refs/heads/master: 15b854853515e7223fd7224de53799af4a66059c
12 changes: 3 additions & 9 deletions trunk/drivers/ide/pci/cs5530.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,13 @@ static int cs5530_config_dma (ide_drive_t *drive)
int unit = drive->select.b.unit;
ide_drive_t *mate = &hwif->drives[unit^1];
struct hd_driveid *id = drive->id;
unsigned int reg, timings;
unsigned int reg, timings = 0;
unsigned long basereg;

/*
* Default to DMA-off in case we run into trouble here.
*/
hwif->ide_dma_off_quietly(drive);
/* turn off DMA while we fiddle */
hwif->ide_dma_host_off(drive);
/* clear DMA_capable bit */

/*
* The CS5530 specifies that two drives sharing a cable cannot
Expand Down Expand Up @@ -182,9 +179,8 @@ static int cs5530_config_dma (ide_drive_t *drive)
case XFER_MW_DMA_1: timings = 0x00012121; break;
case XFER_MW_DMA_2: timings = 0x00002020; break;
default:
printk(KERN_ERR "%s: cs5530_config_dma: huh? mode=%02x\n",
drive->name, mode);
return 1; /* failure */
BUG();
break;
}
basereg = CS5530_BASEREG(hwif);
reg = hwif->INL(basereg+4); /* get drive0 config register */
Expand All @@ -199,8 +195,6 @@ static int cs5530_config_dma (ide_drive_t *drive)
hwif->OUTL(reg, basereg+4); /* write drive0 config register */
hwif->OUTL(timings, basereg+12); /* write drive1 config register */
}
(void) hwif->ide_dma_host_on(drive);
/* set DMA_capable bit */

/*
* Finally, turn DMA on in software, and exit.
Expand Down

0 comments on commit 7563824

Please sign in to comment.