Messages in this thread Patch in this message | | | Date | Sat, 5 Aug 2000 23:05:03 +0200 | From | Andries Brouwer <> | Subject | [PATCH] Re: Compilation problem in 2.4.0test5 : half-module IDE |
| |
On Fri, Aug 04, 2000 at 07:14:04PM +0200, Tomasz Wegrzanowski wrote:
> I menuconfig'ed linux kernel with : > ATA/IDE/MFM/RLL support ---> > <*> ATA/IDE/MFM/RLL support > IDE, ATA and ATAPI Block devices ---> > [in this subdir only modules] > > and got error : > > drivers/ide/idedriver.o: In function `ide_xlate_1024': > drivers/ide/idedriver.o(.text+0x1a5): undefined reference to `get_info_ptr' > drivers/ide/idedriver.o(.text+0x2c7): undefined reference to `current_capacity' > make: *** [vmlinux] Error 1 > > After changing : > <*> ATA/IDE/MFM/RLL support > to : > <M> ATA/IDE/MFM/RLL support > everything compiled well.
Yes. I sent out a patch for this two months ago - forgot whether it was to Andre, Alan or Linus, but I see that 2.4.0test5 does not contain it. There are several issues here, and it may be that this is not yet the final truth, but one aspect is that fs/partitions/msdos.c uses ide_xlate_1024 precisely when CONFIG_BLK_DEV_IDE is defined. So, ide-geometry.c must provide this routine precisely when CONFIG_BLK_DEV_IDE is defined.
(All I see so far are attempts to surround ide-geometry.c with suitable defines, but that is wrong since the routine probe_cmos_for_drives() is used under entirely different circumstances.)
Andries
-------------------------------------------------------------- diff -u --recursive --new-file ../linux-2.4.0ac4/linux/drivers/ide/ide-geometry.c ./linux/drivers/ide/ide-geometry.c --- ../linux-2.4.0ac4/linux/drivers/ide/ide-geometry.c Mon May 29 11:03:57 2000 +++ ./linux/drivers/ide/ide-geometry.c Mon May 29 20:51:47 2000 @@ -2,15 +2,9 @@ * linux/drivers/ide/ide-geometry.c */ #include <linux/config.h> - -#if defined(CONFIG_IDE) && !defined(CONFIG_BLK_DEV_HD) #include <linux/ide.h> - #include <asm/io.h> -extern ide_drive_t * get_info_ptr(kdev_t); -extern unsigned long current_capacity (ide_drive_t *); - /* * We query CMOS about hard disks : it could be that we have a SCSI/ESDI/etc * controller that is BIOS compatible with ST-506, and thus showing up in our @@ -42,7 +36,7 @@ * The code below is bad. One of the problems is that drives 1 and 2 * may be SCSI disks (even when IDE disks are present), so that * the geometry we read here from BIOS is attributed to the wrong disks. - * Consequently, also the "drive->present = 1" below is a mistake. + * Consequently, also the former "drive->present = 1" below was a mistake. * * Eventually the entire routine below should be removed. */ @@ -74,7 +68,8 @@ drive->sect = drive->bios_sect = sect; drive->ctl = *(BIOS+8); } else { - printk("hd%d: C/H/S=%d/%d/%d from BIOS ignored\n", unit, cyl, head, sect); + printk("hd%d: C/H/S=%d/%d/%d from BIOS ignored\n", + unit, cyl, head, sect); } } @@ -84,6 +79,11 @@ } +#ifdef CONFIG_BLK_DEV_IDE + +extern ide_drive_t * get_info_ptr(kdev_t); +extern unsigned long current_capacity (ide_drive_t *); + /* * If heads is nonzero: find a translation with this many heads and S=63. * Otherwise: find out how OnTrack Disk Manager would translate the disk. @@ -211,4 +211,4 @@ drive->bios_cyl, drive->bios_head, drive->bios_sect); return ret; } -#endif /* (CONFIG_IDE) && !(CONFIG_BLK_DEV_HD) */ +#endif /* CONFIG_BLK_DEV_IDE */ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |