With the 'everything is module' and 'everything is hotplug' approach in
mind (which is a appealing way and IMHO this is the way we are going),
I see two part for this problem:
=2E Persistence after plug out/plug in=20
=2E Persistence after suspend/resume
The first one is a userland problem. The card identification could be
based on the MAC address (for NICs at least, in the case of cardbus the
bus position has no real signification). This should then be the
responsibility of the userspace tool (hotplug) to indicate the correct
option for this card. The problem is when the module is already loaded,
the userspace tool has no way to indicate this option.
The second problem is a kernel problem. It seems not so difficult (as
soon as we have a way to identify each card, which is the case for
NICs) to keep in memory the options for further use.
We don't even need a hash here. We can keep in a fifo table the options
for each removed card and then when a card is inserted lookup with the
Clearly the vector of values for an option to control separately each
card is no more adapted to the today hardware.
As I see it what is missing is a way for hotplug to give some directives
(enable wol for this card) back to the kernel. Today this is possible
(done) for the first card for a given driver (via the module options).
On Sat, Mar 23, 2002 at 03:06:49PM -0500, Robert Love wrote:
> On Sat, 2002-03-23 at 13:39, Andrew Morton wrote:
> > in modules.conf, and we really have eight NICS, and they're
> > being plugged and unplugged, how can we reliably associate
> > that option with the eight cards? So the right option is
> > applied to each card eash time it's inserted? Should the
> > option be associated with a card, or with a bus position?
> Ugh, not pretty.
> Associate it with the bus position I'd say?
> If we want a statically allocated array, create one of size N such that
> N is reasonably sane. Then we can "hash" the bus position onto N ...
> something that basically maps the slot number onto N, slot number % N
> will do. Dealing with collisions would be easy, but there really
> shouldn't be any in a sane configuration.
> Ideally we'd have a dynamically created array for the cards and hash
> into that, but, ugh, this is getting gross especially since 99% of us
> have one card and never remove it.
> Robert Love
Christophe Barb=E9 <email@example.com>
GnuPG FingerPrint: E0F6 FADF 2A5C F072 6AF8 F67A 8F45 2F1E D72C B41E
Cats are rather delicate creatures and they are subject to a good
many ailments, but I never heard of one who suffered from insomnia.
--Joseph Wood Krutch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Pour information voir http://www.gnupg.org
-----END PGP SIGNATURE-----
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/