mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andre Hedrick <andre@linux-ide.org>
To: Jeff Chua <jeffchua@silk.corp.fedex.com>
Cc: Richard Gooch <rgooch@ras.ucalgary.ca>,
	Marcelo Tosatti <marcelo@conectiva.com.br>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] for 2.4.19-pre6
Date: Sun, 14 Apr 2002 19:19:48 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.10.10204141911180.1699-300000@master.linux-ide.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0204150958240.3759-100000@boston.corp.fedex.com>

[-- 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;
 }
  

  reply	other threads:[~2002-04-15  2:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-15  0:23 Richard Gooch
2002-04-15  2:00 ` Jeff Chua
2002-04-15  2:19   ` Andre Hedrick [this message]
2002-04-15  3:39   ` Richard Gooch
2002-04-15  2:09 ` Andre Hedrick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.10.10204141911180.1699-300000@master.linux-ide.org \
    --to=andre@linux-ide.org \
    --cc=jeffchua@silk.corp.fedex.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=rgooch@ras.ucalgary.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®