--- zzzz-none-000/linux-2.4.17/drivers/ide/ide-dma.c 2001-09-09 17:43:02.000000000 +0000 +++ sangam-fb-322/linux-2.4.17/drivers/ide/ide-dma.c 2004-11-24 13:23:46.000000000 +0000 @@ -689,11 +689,10 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_ports) { printk(" %s: BM-DMA at 0x%04lx-0x%04lx", hwif->name, dma_base, dma_base + num_ports - 1); - if (check_region(dma_base, num_ports)) { + if (!request_region(dma_base, num_ports, hwif->name)) { printk(" -- ERROR, PORT ADDRESSES ALREADY IN USE\n"); return; } - request_region(dma_base, num_ports, hwif->name); hwif->dma_base = dma_base; hwif->dmatable_cpu = pci_alloc_consistent(hwif->pci_dev, PRD_ENTRIES * PRD_BYTES, @@ -774,9 +773,15 @@ hwif->dma_extra = extra; switch(dev->device) { + /* + * This is buggy. Device numbers are not unique + * between vendors. We should be checking + * both dev->vendor and dev->device + */ case PCI_DEVICE_ID_AL_M5219: case PCI_DEVICE_ID_AMD_VIPER_7409: case PCI_DEVICE_ID_CMD_643: + case PCI_DEVICE_ID_WINBOND_82C105: outb(inb(dma_base+2) & 0x60, dma_base+2); if (inb(dma_base+2) & 0x80) { printk("%s: simplex device: DMA forced\n", name);