Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 66131
b: refs/heads/master
c: a6fe837
h: refs/heads/master
i:
  66129: 0c36104
  66127: 0572cce
v: v3
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 11, 2007
1 parent 3b52ddc commit 03d95df
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 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: ffe5415c3d6138aff412af7e455b3df4d53c0aa0
refs/heads/master: a6fe837ed63aa812bea029a24b7aafc72ba8de88
15 changes: 12 additions & 3 deletions trunk/drivers/ide/pci/alim15x3.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* linux/drivers/ide/pci/alim15x3.c Version 0.25 Jun 9 2007
* linux/drivers/ide/pci/alim15x3.c Version 0.26 Jul 14 2007
*
* Copyright (C) 1998-2000 Michel Aubry, Maintainer
* Copyright (C) 1998-2000 Andrzej Krzysztofowicz, Maintainer
Expand Down Expand Up @@ -418,6 +418,14 @@ static int ali15x3_tune_chipset(ide_drive_t *drive, const u8 speed)
u8 tmpbyte = 0x00;
int m5229_udma = (hwif->channel) ? 0x57 : 0x56;

if (speed < XFER_PIO_0)
return 1;

if (speed >= XFER_PIO_0 && speed <= XFER_PIO_5) {
ali_tune_pio(drive, speed - XFER_PIO_0);
return ide_config_drive_speed(drive, speed);
}

if (speed == XFER_UDMA_6)
speed1 = 0x47;

Expand All @@ -430,8 +438,9 @@ static int ali15x3_tune_chipset(ide_drive_t *drive, const u8 speed)
tmpbyte &= ultra_enable;
pci_write_config_byte(dev, m5229_udma, tmpbyte);

if (speed < XFER_SW_DMA_0)
ali_tune_pio(drive, speed - XFER_PIO_0);
/*
* FIXME: Oh, my... DMA timings are never set.
*/
} else {
pci_read_config_byte(dev, m5229_udma, &tmpbyte);
tmpbyte &= (0x0f << ((1-unit) << 2));
Expand Down

0 comments on commit 03d95df

Please sign in to comment.