* Re: [PATCH] for 2.4.19-pre6
2002-04-15 2:00 ` Jeff Chua
@ 2002-04-15 2:19 ` Andre Hedrick
2002-04-15 3:39 ` Richard Gooch
1 sibling, 0 replies; 5+ messages in thread
From: Andre Hedrick @ 2002-04-15 2:19 UTC (permalink / raw)
To: Jeff Chua; +Cc: Richard Gooch, Marcelo Tosatti, Linux Kernel
[-- Attachment #1: Type: text/plain, Size: 819 bytes --]
Here is the original patch from its base, and the lost fragment.
Cheers,
Andre Hedrick
LAD Storage Consulting Group
On Mon, 15 Apr 2002, Jeff Chua wrote:
>
> On Sun, 14 Apr 2002, Richard Gooch wrote:
>
> > Hi, Marcelo. The last few pre-patches have broken IDE as modules. I
> > would have though this would have been fixed by now, but perhaps
> > no-one else noticed. Here is a patch that fixes the problem.
>
> Richard, I agree with you that seems like nobody cared. I had submitted
> this patch several times, but it's still not fixed.
>
> Jeff.
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
[-- Attachment #2: Type: text/plain, Size: 3156 bytes --]
--- linux-2.4.12.debian/drivers/ide/ide-geometry.c.orig Thu Jan 4 12:50:17 2001
+++ linux-2.4.12.debian/drivers/ide/ide-geometry.c Sat Oct 27 21:50:23 2001
@@ -6,6 +6,8 @@
#include <linux/mc146818rtc.h>
#include <asm/io.h>
+#ifdef CONFIG_BLK_DEV_IDE
+
/*
* 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
@@ -80,9 +82,10 @@
}
#endif
}
+#endif /* CONFIG_BLK_DEV_IDE */
-#ifdef CONFIG_BLK_DEV_IDE
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
extern ide_drive_t * get_info_ptr(kdev_t);
extern unsigned long current_capacity (ide_drive_t *);
@@ -214,4 +217,4 @@
drive->bios_cyl, drive->bios_head, drive->bios_sect);
return ret;
}
-#endif /* CONFIG_BLK_DEV_IDE */
+#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
--- linux-2.4.12.debian/drivers/ide/ide-probe.c.orig Sat Sep 8 12:02:32 2001
+++ linux-2.4.12.debian/drivers/ide/ide-probe.c Sat Oct 27 21:50:23 2001
@@ -913,6 +913,8 @@
}
#ifdef MODULE
+extern int (*ide_xlate_1024_hook)(kdev_t, int, int, const char *);
+
int init_module (void)
{
unsigned int index;
@@ -921,11 +923,13 @@
ide_unregister(index);
ideprobe_init();
create_proc_ide_interfaces();
+ ide_xlate_1024_hook = ide_xlate_1024;
return 0;
}
void cleanup_module (void)
{
ide_probe = NULL;
+ ide_xlate_1024_hook = 0;
}
#endif /* MODULE */
--- linux-2.4.12.debian/fs/partitions/Makefile.orig Thu Jul 26 16:30:04 2001
+++ linux-2.4.12.debian/fs/partitions/Makefile Sat Oct 27 21:50:24 2001
@@ -9,7 +9,7 @@
O_TARGET := partitions.o
-export-objs := check.o ibm.o
+export-objs := check.o ibm.o msdos.o
obj-y := check.o
--- linux-2.4.12.debian/fs/partitions/msdos.c.orig Mon Oct 1 20:03:26 2001
+++ linux-2.4.12.debian/fs/partitions/msdos.c Sat Oct 27 21:50:25 2001
@@ -29,7 +29,13 @@
#ifdef CONFIG_BLK_DEV_IDE
#include <linux/ide.h> /* IDE xlate */
-#endif /* CONFIG_BLK_DEV_IDE */
+#elif defined(CONFIG_BLK_DEV_IDE_MODULE)
+#include <linux/module.h>
+
+int (*ide_xlate_1024_hook)(kdev_t, int, int, const char *);
+EXPORT_SYMBOL(ide_xlate_1024_hook);
+#define ide_xlate_1024 ide_xlate_1024_hook
+#endif
#include <asm/system.h>
@@ -470,7 +476,7 @@
*/
static int handle_ide_mess(struct block_device *bdev)
{
-#ifdef CONFIG_BLK_DEV_IDE
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
Sector sect;
unsigned char *data;
kdev_t dev = to_kdev_t(bdev->bd_dev);
@@ -478,6 +484,10 @@
int heads = 0;
struct partition *p;
int i;
+#ifdef CONFIG_BLK_DEV_IDE_MODULE
+ if (!ide_xlate_1024)
+ return 1;
+#endif
/*
* The i386 partition handling programs very often
* make partitions end on cylinder boundaries.
@@ -539,7 +549,7 @@
/* Flush the cache */
invalidate_bdev(bdev, 1);
truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
-#endif /* CONFIG_BLK_DEV_IDE */
+#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
return 1;
}
[-- Attachment #3: Type: text/plain, Size: 1631 bytes --]
--- linux-2.4.12.debian/fs/partitions/Makefile.orig Thu Jul 26 16:30:04 2001
+++ linux-2.4.12.debian/fs/partitions/Makefile Sat Oct 27 21:50:24 2001
@@ -9,7 +9,7 @@
O_TARGET := partitions.o
-export-objs := check.o ibm.o
+export-objs := check.o ibm.o msdos.o
obj-y := check.o
--- linux-2.4.12.debian/fs/partitions/msdos.c.orig Mon Oct 1 20:03:26 2001
+++ linux-2.4.12.debian/fs/partitions/msdos.c Sat Oct 27 21:50:25 2001
@@ -29,7 +29,13 @@
#ifdef CONFIG_BLK_DEV_IDE
#include <linux/ide.h> /* IDE xlate */
-#endif /* CONFIG_BLK_DEV_IDE */
+#elif defined(CONFIG_BLK_DEV_IDE_MODULE)
+#include <linux/module.h>
+
+int (*ide_xlate_1024_hook)(kdev_t, int, int, const char *);
+EXPORT_SYMBOL(ide_xlate_1024_hook);
+#define ide_xlate_1024 ide_xlate_1024_hook
+#endif
#include <asm/system.h>
@@ -470,7 +476,7 @@
*/
static int handle_ide_mess(struct block_device *bdev)
{
-#ifdef CONFIG_BLK_DEV_IDE
+#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
Sector sect;
unsigned char *data;
kdev_t dev = to_kdev_t(bdev->bd_dev);
@@ -478,6 +484,10 @@
int heads = 0;
struct partition *p;
int i;
+#ifdef CONFIG_BLK_DEV_IDE_MODULE
+ if (!ide_xlate_1024)
+ return 1;
+#endif
/*
* The i386 partition handling programs very often
* make partitions end on cylinder boundaries.
@@ -539,7 +549,7 @@
/* Flush the cache */
invalidate_bdev(bdev, 1);
truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
-#endif /* CONFIG_BLK_DEV_IDE */
+#endif /* defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) */
return 1;
}
^ permalink raw reply [flat|nested] 5+ messages in thread