Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48828
b: refs/heads/master
c: 9ef5791
h: refs/heads/master
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Feb 17, 2007
1 parent 1718eee commit 7148bc3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 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: d8f4469d5f2c35e0b8272f254b42737a2b8ce877
refs/heads/master: 9ef5791e1be91007951477b8ed1530ac1166a8e7
26 changes: 11 additions & 15 deletions trunk/drivers/ide/pci/sgiioc4.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,21 +274,6 @@ sgiioc4_ide_dma_end(ide_drive_t * drive)
return dma_stat;
}

static int
sgiioc4_ide_dma_check(ide_drive_t * drive)
{
if (ide_config_drive_speed(drive, XFER_MW_DMA_2) != 0) {
printk(KERN_INFO
"Couldnot set %s in Multimode-2 DMA mode | "
"Drive %s using PIO instead\n",
drive->name, drive->name);
drive->using_dma = 0;
} else
drive->using_dma = 1;

return 0;
}

static int
sgiioc4_ide_dma_on(ide_drive_t * drive)
{
Expand All @@ -305,6 +290,17 @@ sgiioc4_ide_dma_off_quietly(ide_drive_t * drive)
return HWIF(drive)->ide_dma_host_off(drive);
}

static int sgiioc4_ide_dma_check(ide_drive_t *drive)
{
/* FIXME: check for available DMA modes */
if (ide_config_drive_speed(drive, XFER_MW_DMA_2) != 0) {
printk(KERN_WARNING "%s: couldn't set MWDMA2 mode, "
"using PIO instead\n", drive->name);
return sgiioc4_ide_dma_off_quietly(drive);
} else
return sgiioc4_ide_dma_on(drive);
}

/* returns 1 if dma irq issued, 0 otherwise */
static int
sgiioc4_ide_dma_test_irq(ide_drive_t * drive)
Expand Down

0 comments on commit 7148bc3

Please sign in to comment.