Re: [PATCH] 3c59x and resume

Robert Love (rml@tech9.net)
23 Mar 2002 15:06:49 -0500


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

-
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/