Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 48809
b: refs/heads/master
c: ea266ba
h: refs/heads/master
i:
  48807: 6c7f498
v: v3
  • Loading branch information
Sergei Shtylyov authored and Bartlomiej Zolnierkiewicz committed Feb 17, 2007
1 parent e49d99d commit cafdf1b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 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: fed21641be7b31338dcf6753ef7f8a396242a410
refs/heads/master: ea266ba1591d28889645a245e1df6f889c574640
18 changes: 4 additions & 14 deletions trunk/drivers/ide/pci/sl82c105.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static int sl82c105_check_drive (ide_drive_t *drive)
return hwif->ide_dma_on(drive);
}

if (__ide_dma_good_drive(drive))
if (__ide_dma_good_drive(drive) && id->eide_dma_time < 150)
return hwif->ide_dma_on(drive);
} while (0);

Expand Down Expand Up @@ -259,10 +259,8 @@ static int sl82c105_ide_dma_on (ide_drive_t *drive)
{
DBG(("sl82c105_ide_dma_on(drive:%s)\n", drive->name));

if (config_for_dma(drive)) {
config_for_pio(drive, 4, 0, 0);
return HWIF(drive)->ide_dma_off_quietly(drive);
}
if (config_for_dma(drive))
return 1;
printk(KERN_INFO "%s: DMA enabled\n", drive->name);
return __ide_dma_on(drive);
}
Expand All @@ -278,7 +276,6 @@ static int sl82c105_ide_dma_off_quietly (ide_drive_t *drive)
if (drive->pio_speed)
speed = drive->pio_speed - XFER_PIO_0;
config_for_pio(drive, speed, 0, 1);
drive->current_speed = drive->pio_speed;

return rc;
}
Expand Down Expand Up @@ -401,11 +398,9 @@ static unsigned int __devinit init_chipset_sl82c105(struct pci_dev *dev, const c
/*
* Initialise the chip
*/

static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
{
unsigned int rev;
u8 dma_state;

DBG(("init_hwif_sl82c105(hwif: ide%d)\n", hwif->index));

Expand All @@ -431,7 +426,6 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
if (!hwif->dma_base)
return;

dma_state = hwif->INB(hwif->dma_base + 2) & ~0x60;
rev = sl82c105_bridge_revision(hwif->pci_dev);
if (rev <= 5) {
/*
Expand All @@ -441,11 +435,8 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
printk(" %s: Winbond 553 bridge revision %d, BM-DMA disabled\n",
hwif->name, rev);
} else {
dma_state |= 0x60;

hwif->atapi_dma = 1;
hwif->mwdma_mask = 0x07;
hwif->swdma_mask = 0x07;
hwif->mwdma_mask = 0x04;

hwif->ide_dma_check = &sl82c105_check_drive;
hwif->ide_dma_on = &sl82c105_ide_dma_on;
Expand All @@ -462,7 +453,6 @@ static void __devinit init_hwif_sl82c105(ide_hwif_t *hwif)
if (hwif->mate)
hwif->serialized = hwif->mate->serialized = 1;
}
hwif->OUTB(dma_state, hwif->dma_base + 2);
}

static ide_pci_device_t sl82c105_chipset __devinitdata = {
Expand Down

0 comments on commit cafdf1b

Please sign in to comment.