diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-01-11 04:02:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-01-11 04:02:40 +0000 |
commit | e47f00743fc4776491344f2c618cc8dc2c23bcbc (patch) | |
tree | 13e03a113a82a184c51c19c209867cfd3a59b3b9 /drivers/ide/hpt366.c | |
parent | b2ad5f821b1381492d792ca10b1eb7a107b48f14 (diff) |
Merge with Linux 2.4.0.
Diffstat (limited to 'drivers/ide/hpt366.c')
-rw-r--r-- | drivers/ide/hpt366.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/ide/hpt366.c b/drivers/ide/hpt366.c index abd6d8ac7..62e2437e5 100644 --- a/drivers/ide/hpt366.c +++ b/drivers/ide/hpt366.c @@ -346,6 +346,9 @@ static void hpt370_tune_chipset (ide_drive_t *drive, byte speed, int direction) static int hpt3xx_tune_chipset (ide_drive_t *drive, byte speed) { + if ((drive->media != ide_disk) && (speed < XFER_SW_DMA_0)) + return -1; + if (!drive->init_speed) drive->init_speed = speed; @@ -428,6 +431,9 @@ static int config_chipset_for_dma (ide_drive_t *drive) byte ultra66 = eighty_ninty_three(drive); int rval; + if ((drive->media != ide_disk) && (speed < XFER_SW_DMA_0)) + return ((int) ide_dma_off_quietly); + if ((id->dma_ultra & 0x0020) && (!check_in_drive_lists(drive, bad_ata100_5)) && (HPT370_ALLOW_ATA100_5) && @@ -617,8 +623,14 @@ unsigned int __init pci_init_hpt366 (struct pci_dev *dev, const char *name) pci_write_config_byte(dev, PCI_ROM_ADDRESS, dev->resource[PCI_ROM_RESOURCE].start | PCI_ROM_ADDRESS_ENABLE); pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &test); + +#if 0 if (test != 0x08) pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 0x08); +#else + if (test != (L1_CACHE_BYTES / 4)) + pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, (L1_CACHE_BYTES / 4)); +#endif pci_read_config_byte(dev, PCI_LATENCY_TIMER, &test); if (test != 0x78) |