Bug 1232 - Wont build without DMA support enabled
Summary: Wont build without DMA support enabled
Status: CLOSED PATCH_ALREADY_AVAILABLE
Alias: None
Product: IO/Storage
Classification: Unclassified
Component: IDE (show other bugs)
Hardware: i386 Linux
: P2 normal
Assignee: Bartlomiej Zolnierkiewicz
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-14 15:14 UTC by P
Modified: 2004-12-09 04:37 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.0-test5
Tree: Mainline
Regression: ---


Attachments
The .config used for this compilation (7.58 KB, text/plain)
2003-09-14 15:16 UTC, P
Details
patch for drivers/ide/setup-ide.c (1.14 KB, patch)
2003-10-01 03:00 UTC, Reimar D
Details | Diff
patch for drivers/ide/pci/generic.c (424 bytes, patch)
2003-10-01 03:00 UTC, Reimar D
Details | Diff

Description P 2003-09-14 15:14:10 UTC
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
Comment 1 P 2003-09-14 15:16:47 UTC
Created attachment 890 [details]
The .config used for this compilation
Comment 2 Reimar D 2003-10-01 02:58:14 UTC
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...
Comment 3 Reimar D 2003-10-01 03:00:00 UTC
Created attachment 966 [details]
patch for drivers/ide/setup-ide.c
Comment 4 Reimar D 2003-10-01 03:00:54 UTC
Created attachment 967 [details]
patch for drivers/ide/pci/generic.c
Comment 5 Alexander Nyberg 2004-12-09 04:37:00 UTC
Just tried with 2.6.10-rc3 and it builds, closing.

Note You need to log in before you can comment on or make changes to this bug.