Re: [PATCH] 3c59x and resume

(no name) ((no email))
Sat, 23 Mar 2002 17:44:33 -0500


--4bRzO86E/ozDv8r1
Content-Type: text/plain; charset=iso-8859-15
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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
MAC address.

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).

Christophe

On Sat, Mar 23, 2002 at 03:06:49PM -0500, Robert Love wrote:
> On Sat, 2002-03-23 at 13:39, Andrew Morton wrote:
>=20
> > 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?
>=20
> Ugh, not pretty.
>=20
> Associate it with the bus position I'd say?
>=20
> 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.
>=20
> 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.
>=20
> Robert Love
>=20

--=20
Christophe Barb=E9 <christophe.barbe@ufies.org>
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

--4bRzO86E/ozDv8r1
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Pour information voir http://www.gnupg.org

iD8DBQE8nQVRj0UvHtcstB4RAsspAJ933609ej8X/oMTtmmAMm/xQuWA+gCdH2wT
F9bdEBxXKcc6C9F7xXkEzgA=
=uuD6
-----END PGP SIGNATURE-----

--4bRzO86E/ozDv8r1--
-
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/