mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* RE: Which driver took effect?
@ 2001-01-10 21:03 tnvander
  2001-01-10 23:46 ` Jan-Benedict Glaw
  0 siblings, 1 reply; 3+ messages in thread
From: tnvander @ 2001-01-10 21:03 UTC (permalink / raw)
  To: jbglaw; +Cc: linux-kernel

Hello,

I looked at some outputs and 
/proc/interrupts
/proc/ioports
/proc/iomem

at least tell you some info, but not consistent (ie, consider:
tnl@anna:~ > cat /proc/interrupts 
           CPU0       
  0:   80119205          XT-PIC  timer
  1:          2          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  3:    3213269          XT-PIC  NE2000
 11:     501898          XT-PIC  eth0
 12:          0          XT-PIC  PS/2 Mouse
 13:          1          XT-PIC  fpu
 14:     445106          XT-PIC  ide0
NMI:          0

tnl@anna:~ > cat /proc/ioports 
0000-001f : dma1
0020-003f : pic1
0040-005f : timer
0060-006f : keyboard
0080-008f : dma page reg
00a0-00bf : pic2
00c0-00df : dma2
00f0-00ff : fpu
01f0-01f7 : ide0
0210-021f : 3c509
02f8-02ff : serial(auto)
0300-031f : NE2000
03c0-03df : vga+
03f6-03f6 : ide0
03f8-03ff : serial(auto)

Should I grep for interface name or driver name?? The eth0/3c509 doesn't even report itself the same way in those two lists. That's on kernel 2.2 though. On my other machine with only a tulip card it reported eth0 on all 3 /proc files. Is 2.4 more consistent, or is it a property of the tulip driver to be more consistent?)

If you have two cards which use the same driver, and you build the driver into the kernel (non-modular), you can specify on the kernel commandline which card should be first, second etc. For my case, which is modular, I put the following in /etc/modules.conf:

alias eth0 3c509
alias eth1 ne

Of course, it requires manual configuration per PC and that's probably not what you wanted for a bootdisk...


And scanning dmesg is indeed just the road to ugly hacks, although it does seem common practice to report as <interface:drivername at ...> so that perhaps an interface name can be linked to a drivername and both can be used to scan thru /proc/ioports and /proc/interrupts...   Yes, sounds terribly hacky, sounds like perl or python are wanted for this, sounds like a job too large for a bootdisk...

I'm sorry that I can't help you! I thought that /proc/interrupts etc was good advice and then found out that it's as messy :-(

--Tim




-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Which driver took effect?
  2001-01-10 21:03 Which driver took effect? tnvander
@ 2001-01-10 23:46 ` Jan-Benedict Glaw
  0 siblings, 0 replies; 3+ messages in thread
From: Jan-Benedict Glaw @ 2001-01-10 23:46 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1300 bytes --]

On Thu, Jan 11, 2001 at 12:33:22AM +0330, tnvander@chello.nl wrote:
> Hello,
> 
> I looked at some outputs and 
> /proc/interrupts
> /proc/ioports
> /proc/iomem

It's all messy and inconsistent;(

> And scanning dmesg is indeed just the road to ugly hacks, although
> it does seem common practice to report as <interface:drivername at ...>
> so that perhaps an interface name can be linked to a drivername and

Well, some do it that way;)

> both can be used to scan thru /proc/ioports and /proc/interrupts...
> Yes, sounds terribly hacky, sounds like perl or python are wanted
> for this, sounds like a job too large for a bootdisk...

Getting the base IO address is no problem:

/sbin/ifconfig eth0 | grep "Base address" | cut -f 3 -d ':'

...but getting the appropriate driver is not that easy;(

> I'm sorry that I can't help you! I thought that /proc/interrupts
> etc was good advice and then found out that it's as messy :-(

That's just what I thought;)

MfG, JBG

-- 
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!!
/* Jan-Benedict Glaw <jbglaw@lug-owl.de> -- +49-177-5601720 */
keyID=0x8399E1BB fingerprint=250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB
     "insmod vi.o and there we go..." (Alexander Viro on linux-kernel)

[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Which driver took effect?
@ 2001-01-10 16:21 Jan-Benedict Glaw
  0 siblings, 0 replies; 3+ messages in thread
From: Jan-Benedict Glaw @ 2001-01-10 16:21 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1434 bytes --]

Hi!

I'm building an installer (to install Linux as a .tar.gz off an
SMB share) usind a single floppy with some compiled-in network
drivers. These drivers are modular in the .tgz which gets uncompressed,
but most of them need parameters (normally, you have to supply
a base I/O address). Getting the address is no problem - ifconfig
tells you. But I can't see an easy way (neither in 2.2.x nor in
2.4.x) th be told "eth0 is driven by eepro, eth1 is driven by
ne, ...")

Parsing `dmesg` isn't fun at all (even not with restricted floppy
disk space to store a number of output variants), and different
drivers do have *very* different outputs (if they annouce themselves
at all).

So I'd like to know:

        - Can you tell me a smart way to see which driver handles
          which network interface?
        - Would a patch to add eg. /proc/net/drivers reporting:

                eth0,   eepro,  0x300,  10
                eth1,   ne,     0x240,  5

          be accepted? I think sth like that would be useful at all...

In 2.4.x, register_netdev() would be a good starting point to do
it...

MfG, JBG

-- 
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!!
/* Jan-Benedict Glaw <jbglaw@lug-owl.de> -- +49-177-5601720 */
keyID=0x8399E1BB fingerprint=250D 3BCF 7127 0D8C A444 A961 1DBD 5E75 8399 E1BB
     "insmod vi.o and there we go..." (Alexander Viro on linux-kernel)

[-- Attachment #2: Type: application/pgp-signature, Size: 240 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-01-10 23:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-01-10 21:03 Which driver took effect? tnvander
2001-01-10 23:46 ` Jan-Benedict Glaw
  -- strict thread matches above, loose matches on Subject: below --
2001-01-10 16:21 Jan-Benedict Glaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®