From: Arkadiusz Miskiewicz <arekm@pld-linux.org>
To: Marcelo Tosatti <marcelo.tosatti@cyclades.com>,
Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Cc: Alan Cox <alan@redhat.com>, <linux-kernel@vger.kernel.org>
Subject: Re: modular IDE in 2.4.23
Date: Mon, 24 Nov 2003 01:50:36 +0100 [thread overview]
Message-ID: <200311240150.37065.arekm@pld-linux.org> (raw)
In-Reply-To: <Pine.LNX.4.44.0311232221080.1292-100000@logos.cnet>
On Monday 24 of November 2003 01:22, Marcelo Tosatti wrote:
> Hum I think the saner approach is to remove the hotplugging indeed.
>
> Mind writting me a patch Bart? :)
Hm, maybe for 2.4.23 it is sane but then reapply it again + merge ide-core and ide-detect
since solution with ide-probe-mini works well.
Right now I've cleaned up a bit my old patch and it is attached bellow. I'm currently
compiling kernel with it (so all my tests were done with old (uglier, #include "ide-probe.c" )
version of this patch).
Also probably most of #includes from ide-probe-mini.c could be removed, too.
ps. is there some magic way to avoid need of extern int ideprobe_init_module(void); etc
in ide-probe-mini.c?
diff -urN linux-2.4.22.org/drivers/ide/ide-probe.c linux-2.4.22/drivers/ide/ide-probe.c
--- linux-2.4.22.org/drivers/ide/ide-probe.c 2003-11-23 23:01:39.000000000 +0100
+++ linux-2.4.22/drivers/ide/ide-probe.c 2003-11-23 23:05:18.000000000 +0100
@@ -1416,22 +1416,30 @@
#ifdef MODULE
extern int (*ide_xlate_1024_hook)(kdev_t, int, int, const char *);
-int init_module (void)
+static int ideprobe_done = 0;
+
+int ideprobe_init_module (void)
{
unsigned int index;
+
+ if (ideprobe_done)
+ return -EBUSY;
for (index = 0; index < MAX_HWIFS; ++index)
ide_unregister(index);
ideprobe_init();
create_proc_ide_interfaces();
ide_xlate_1024_hook = ide_xlate_1024;
+ ideprobe_done++;
return 0;
}
-void cleanup_module (void)
+void ideprobe_cleanup_module (void)
{
ide_probe = NULL;
ide_xlate_1024_hook = 0;
}
+EXPORT_SYMBOL(ideprobe_init_module);
+EXPORT_SYMBOL(ideprobe_cleanup_module);
MODULE_LICENSE("GPL");
#endif /* MODULE */
diff -urN linux-2.4.22.org/drivers/ide/ide-probe-mini.c linux-2.4.22/drivers/ide/ide-probe-mini.c
--- linux-2.4.22.org/drivers/ide/ide-probe-mini.c 1970-01-01 01:00:00.000000000 +0100
+++ linux-2.4.22/drivers/ide/ide-probe-mini.c 2003-11-23 23:08:21.000000000 +0100
@@ -0,0 +1,29 @@
+/*
+ * linux/drivers/ide/ide-probe-mini.c Version 1
+ *
+ * Copyright (C) 1994-1998 Linus Torvalds & authors (see below)
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/string.h>
+#include <linux/kernel.h>
+#include <linux/kmod.h>
+
+#ifdef MODULE
+extern int ideprobe_init_module(void);
+
+int init_module (void)
+{
+ return ideprobe_init_module();
+}
+
+extern void ideprobe_cleanup_module(void);
+
+void cleanup_module (void)
+{
+ ideprobe_cleanup_module();
+}
+MODULE_LICENSE("GPL");
+#endif /* MODULE */
diff -urN linux-2.4.22.org/drivers/ide/Makefile linux-2.4.22/drivers/ide/Makefile
--- linux-2.4.22.org/drivers/ide/Makefile 2003-11-23 23:01:39.000000000 +0100
+++ linux-2.4.22/drivers/ide/Makefile 2003-11-23 23:02:29.000000000 +0100
@@ -9,7 +9,7 @@
#
-export-objs := ide-iops.o ide-taskfile.o ide-proc.o ide.o ide-probe.o ide-dma.o ide-lib.o setup-pci.o ide-io.o ide-disk.o
+export-objs := ide-iops.o ide-taskfile.o ide-proc.o ide.o ide-probe.o ide-probe-mini.o ide-dma.o ide-lib.o setup-pci.o ide-io.o ide-disk.o
all-subdirs := arm legacy pci ppc raid
mod-subdirs := arm legacy pci ppc raid
@@ -28,9 +28,8 @@
# Core IDE code - must come before legacy
-ide-core-objs := ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-io.o ide-default.o ide-proc.o
-ide-detect-objs := ide-probe.o ide-geometry.o
-
+ide-core-objs := ide-iops.o ide-taskfile.o ide.o ide-lib.o ide-io.o ide-default.o ide-proc.o ide-probe.o ide-geometry.o
+ide-detect-objs := ide-probe-mini.o
ifeq ($(CONFIG_BLK_DEV_IDEPCI),y)
ide-core-objs += setup-pci.o
--
Arkadiusz Miśkiewicz CS at FoE, Wroclaw University of Technology
arekm.pld-linux.org AM2-6BONE, 1024/3DB19BBD, arekm(at)ircnet, PLD/Linux
next prev parent reply other threads:[~2003-11-24 0:51 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200311231310.38793.arekm@pld-linux.org>
2003-11-23 17:08 ` modular IDE in 2.4.23 Marcelo Tosatti
2003-11-23 20:23 ` Bartlomiej Zolnierkiewicz
2003-11-23 20:56 ` Alan Cox
2003-11-23 21:26 ` Bartlomiej Zolnierkiewicz
2003-11-23 21:49 ` Alan Cox
2003-11-24 0:25 ` Marcelo Tosatti
2003-11-24 9:15 ` Alan Cox
2003-11-24 0:22 ` Marcelo Tosatti
2003-11-24 0:50 ` Arkadiusz Miskiewicz [this message]
2003-11-24 9:19 ` Alan Cox
2003-11-22 16:46 Arkadiusz Miskiewicz
2003-11-22 17:31 ` Marcelo Tosatti
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=200311240150.37065.arekm@pld-linux.org \
--to=arekm@pld-linux.org \
--cc=B.Zolnierkiewicz@elka.pw.edu.pl \
--cc=alan@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.tosatti@cyclades.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.