From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 24258 invoked from network); 12 Aug 1999 14:38:56 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 12 Aug 1999 14:38:56 -0000 Received: from ellpspace.math.ualberta.ca (michal@ellpspace.math.ualberta.ca [129.128.88.19]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id KAA32749 for ; Thu, 12 Aug 1999 10:38:55 -0400 Received: (from michal@localhost) by ellpspace.math.ualberta.ca (8.8.8/8.8.8) id IAA19658 for axp-list@redhat.com; Thu, 12 Aug 1999 08:38:52 -0600 From: Michal Jaegermann Message-Id: <199908121438.IAA19658@ellpspace.math.ualberta.ca> Subject: Re: How do you force an Ethernet mode ??? To: axp-list@redhat.com Date: Thu, 12 Aug 1999 08:38:52 -0600 (MDT) In-Reply-To: from "B. James Phillippe" at Aug 11, 99 08:30:35 pm Content-Type: text B. James Phillippe wrote: > > If you are using tulip.c, you can pass parameters on the insmod line as > follows (from the source): > > #define MAX_UNITS 8 > /* Used to pass the full-duplex flag, etc. */ > static int full_duplex[MAX_UNITS] = {0, }; > static int options[MAX_UNITS] = {0, }; > static int mtu[MAX_UNITS] = {0, }; > > /* The possible media types that can be set in options[] are: */ > static const char * const medianame[] = { > "10baseT", "10base2", "AUI", "100baseTx", > "10baseT-FD", "100baseTx-FD", "100baseT4", "100baseFx", > "100baseFx-FD", "MII 10baseT", "MII 10baseT-FD", "MII", > "10baseT(forced)", "MII 100baseTx", "MII 100baseTx-FD", "MII > 100baseT4",}; > ... > > MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i"); ^^^^^^^ ^^^^^^^ It may be not immedately clear but that code fragment really means that an argument name is "options" and, from the sources once again but another part, its parameter is an index to the table above. So to use "10baseT(forced)" you do 'insmod tulip options=12' or, much better, you put in /etc/conf.modules a line like that: options tulip options=12 debug=1 and whatever else which is recognized and you feel like it. Yes, "options" twice. The first one is a part of a syntax of conf.modules; the second one happens to be a name of a tulip module argument. If you want to argue that this is not the best possible syntax then I agree. :-) Michal