Hi Martin,
ide_module_t was designed to conceptually divide the code to multiple
layers,
whether one actually uses modules or compiles all the IDE code into the
kernel,
and in the future, to alow several parallel implementations of the same
functionality
which could reside in the kernel simultaneously.
The job was not finished, but the original idea was to have:
1. Core IDE code.
2. Chipset modules.
3. Probe modules.
4. Subdriver modules.
ide_module_t was created so that the core IDE code could track all the
modules
currently available to it, and to be able to have several chipset drivers
for the same
chipset simultaneously, several probe modules simultaneously, and several
subdrivers
for the same device type (so that one could choose the one which works
best).
The last example was actually used in ide-scsi.c. The intention in
ide_module_t was
that one would be able to have, for example, ide-cdrom + ide-scsi or
ide-tape + ide-scsi
in the kernel simultaneously (either compiled in or as modules), known to
the
core IDE code, and one could then change drivers for a single drive on the
fly using
something like "cat driver_name > /proc/ide/hdx/driver".
Upon receiving such a command, the IDE core could call the cleanup code of
the driver which was originally assigned to hdx, the cleanup code would
de-attach
the driver from hdx without unloading the module and without affecting the
other drives which are currently supported by it. The core code could then
call the init code of the other driver to attach to the device.
The reason ide-probe was splitted to a different module is that in most of
the
time, one doesn't need the probe code in the kernel. It is needed during
boot, and
each time one "hot swaps" an IDE device. In addition, it could provide the
framework
for having several probe modules simultaneously, altough that never
materialized.
Cheers,
Gadi
----- Original Message -----
From: "Martin Dalecki" <dalecki@evision-ventures.com>
To: "Linus Torvalds" <torvalds@transmeta.com>
Cc: "Kernel Mailing List" <linux-kernel@vger.kernel.org>
Sent: Tuesday, February 19, 2002 1:46 PM
Subject: [PATCH] 2.5.5-pre1 IDE cleanup 9
> The attached patch does the following:
>
> 1. Kill the ide-probe-mod by merging it with ide-mod. There is *really*
> no reaons for having this stuff split up into two different
> modules unless you wan't to create artificial module dependancies
> and waste space
> of page boundaries during memmory allocation for the modules
>
> 2. Kill the ide_module_t - which is unnecessary and presents a
> "reimplementation"
> of module handling inside the ide driver. This is achieved by
> attaching the
> initialization routine ot the ide_driver_t, which will be gone next
> time,
> since there is no sane reason apparently, which this couldn't be done
> during the module-generic initialization of the corresponding driver
> module.
>
> 3. Kill unnecessary tagging of "subdriver" with IDE_SUBDRIVER_VERSION - we
> have plenty of other mechanisms for module consistency checking. And
> anyway
> the ide code didn't any consistence checks on this value at all.
>
> NOTE: The ide_(un)register_module() functions will be killed in next
round.
>
> This patch should apply to mainstream, however it waws created on top of
> the others.
>
>
>
-
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/
This archive was generated by hypermail 2b29 : Sat Feb 23 2002 - 21:00:40 EST