From: Mark Atwood <mra@pobox.com>
To: linux-kernel@vger.kernel.org
Cc: Tim Jansen <tim@tjansen.de>
Subject: How to hack a network driver to use a specific ethX (was Re: How does "alias ethX drivername" in modules.conf work?)
Date: 06 Aug 2001 12:46:00 -0700 [thread overview]
Message-ID: <m3g0b5q8ef.fsf_-_@flash.localdomain> (raw)
In-Reply-To: <m33d78de7d.fsf@flash.localdomain> <15SnZL-05h4nQC@fmrl06.sul.t-online.com>
In-Reply-To: Tim Jansen's message of "Sat, 4 Aug 2001 00:39:20 +0200"
Tim Jansen <tim@tjansen.de> writes:
> On Friday 03 August 2001 23:29, Mark Atwood wrote:
> > I'm trying to figure out how "alias ethX" works in /etc/modules.conf
> > Is it some "magic" in depmod / modprobe? And how is the network
> > interface identifier then passed into the module when it loads?
>
> If some user-space app accesses ethX the kernel calls "/sbin/modprobe ethX".
> The alias in /etc/modules.conf just gives ethX the name of the real module.
> The interface identifier isn't passed to the module, you have to initialize
> your interfaces in the right order (or set it using an option for modprobe,
> but I don't whether any drivers support setting the interface identifier).
Are their any examples of drivers that can set the interface identifier?
If it possible that a driver may do so, does that mean that the kernel
can handle interface identifiers being set "out of order"?
My problem stems the following situation:
eth0 is an "ordinary" PCI hme ethernet device. That works just fine.
eth1 is a weird device that is still under hardware development,
and, depending on the phase of the moon and the favor of the Gods,
sometimes comes up and sometimes doesnt
there is a line in /etc/modules that looks like
alias eth1 weirddevice
eth2 is to be a hot plugged PCMCIA ethernet device
In the cases when "weirddevice" properly comes up, I can
see it's driver in lsmod,
see it's interface in ifconfig as eth1,
and then when I plug in the PCMCIA card
it gets eth2, and works fine
In the cases when "weirddevice" doesnt come up, I can
still see it's driver in lsmod
but it's marked "(unused)"
dont see it in ifconfig
and then when I plug in the PCMCIA card
it gets eth1,
i can see the module driver in lsmod
i can see the interface in eth1
BUT
it doesnt work, and the cardmgr error log says that cardmgr keeps trying to reset the card to make it work
I suspect that the cardmgr is loading the correct card driver module,
but then some sort of argument is happening under the hood, as the
card driver knows that it registered eth1, but the modules.conf has
the "alias eth1 weirddevice" line.
I'm feeling that the easiest way to make my headache go away is be
able to somehow insist to each network driver "YOU go in eth1, no
matter what, and YOU go in eth2, no matter if their is a eth1 or not".
I cannot do this by MAC address, because I have a small herd of these
boxes, with different MACs for each interface in each box, and, if my
employers dreams come true, there will soon enough be hundreds and
then thousands of these boxes.
If it's not too terribly hard to modify a network driver to go to an
interface specified as a module option, I can probably hack that into
the module drivers (I do have the source to them, thank gods.)
--
Mark Atwood | I'm wearing black only until I find something darker.
mra@pobox.com | http://www.pobox.com/~mra
prev parent reply other threads:[~2001-08-06 19:46 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-03 21:29 How does "alias ethX drivername" in modules.conf work? Mark Atwood
2001-08-04 1:21 ` Chris Wedgwood
2001-08-04 1:32 ` Thomas Duffy
2001-08-04 2:31 ` Chris Wedgwood
2001-08-04 4:39 ` Jim Roland
2001-08-04 19:35 ` Riley Williams
2001-08-06 19:59 ` Thomas Duffy
2001-08-06 22:56 ` Riley Williams
2001-08-06 23:46 ` Andrzej Krzysztofowicz
2001-08-07 7:04 ` Riley Williams
2001-08-07 10:49 ` Andrzej Krzysztofowicz
2001-08-07 19:04 ` Riley Williams
2001-08-07 21:46 ` Mark Atwood
2001-08-07 22:33 ` Tim Jansen
2001-08-07 23:06 ` Josh Wyatt
2001-08-07 23:35 ` Riley Williams
2001-08-08 0:04 ` Josh Wyatt
2001-08-08 6:28 ` Riley Williams
2001-08-08 10:59 ` Alan Cox
2001-08-08 0:08 ` Mark Atwood
2001-08-08 6:40 ` Riley Williams
2001-08-08 8:41 ` Andrzej Krzysztofowicz
2001-08-08 10:52 ` Eric W. Biederman
2001-08-08 11:40 ` Andrzej Krzysztofowicz
2001-08-08 22:04 ` Riley Williams
2001-08-08 21:09 ` Riley Williams
2001-08-08 0:11 ` Mark Atwood
2001-08-08 6:47 ` Riley Williams
2001-08-08 0:16 ` Mark Atwood
2001-08-08 20:26 ` Riley Williams
2001-08-08 9:30 ` Andrzej Krzysztofowicz
2001-08-08 21:31 ` Riley Williams
2001-08-08 21:42 ` Alan Cox
2001-08-08 22:24 ` Horst von Brand
[not found] ` <9kpub6$8fu$1@ns1.clouddancer.com>
2001-08-09 20:05 ` Colonel
2001-08-10 6:32 ` Paul Gortmaker
2001-08-10 21:25 ` Riley Williams
2001-08-15 4:32 ` Paul Gortmaker
2002-03-28 2:52 ` How to tell how much to expect from a fd Mark Atwood
2002-03-28 13:27 ` Eric Lammerts
2002-03-31 3:03 ` David Schwartz
2001-08-04 4:33 ` How does "alias ethX drivername" in modules.conf work? Jim Roland
2001-08-04 4:48 ` Jim Roland
[not found] ` <15SnZL-05h4nQC@fmrl06.sul.t-online.com>
2001-08-06 19:46 ` Mark Atwood [this message]
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=m3g0b5q8ef.fsf_-_@flash.localdomain \
--to=mra@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tim@tjansen.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox