Distribution: Debian testing Hardware Environment: ASUS P4C800 Deluxe, i875 chipset 2.80 GHz P4 CPU hda: quantum fireball lct08 hdc: plextor cd-writer hde: Seagate Barracuda V S-ATA, 120GB (ST3120023AS) Software Environment: glibc 2.3.1 gcc 3.3 (but kernel compiled with gcc 2.95 Problem Description: I'm unable to compile the kernel if I dont select generic PCI bus-master DMA support, BLK_DEV_IDEDMA_PCI. If that's not selected, on the line after LD .tmp_vmlinux1 I get this error message: drivers/built-in.o(.text+0x1f52d): In function `init_dma_generic': : undefined reference to `ide_setup_dma' drivers/built-in.o(.text+0x2b5a5): In function `ide_hwif_setup_dma': : undefined reference to `ide_setup_dma' make: *** [.tmp_vmlinux1] Error 1 Steps to reproduce: configure the kernel without BLK_DEV_IDEDMA_PCI and execute make
Created attachment 890 [details] The .config used for this compilation
I had the same problem with kernel 2.6.0-test6 when enabling RZ1000 chipset drivers but disabling BLK_DEV_IDEDMA_PCI. This seems to be because drivers/ide/setup-ide.c and drivers/ide/pci/generic.c call ide_setup_dma, which is defined in drivers/ide/ide-dma.c. This file is of course not linked in when DMA support is disabled. I made a patch that fixes the problem (it removes anything that has to do with DMA from setup-ide.c and generic.c when CONFIG_BLK_DEV_IDEDMA_PCI isn't set), but I'm not absolutely sure it won't break anything, especially the generic driver with a DMA-capable chipset (but DMA support disabled during kernel compile) I think should be tested...
Created attachment 966 [details] patch for drivers/ide/setup-ide.c
Created attachment 967 [details] patch for drivers/ide/pci/generic.c
Just tried with 2.6.10-rc3 and it builds, closing.