All of lore.kernel.org
 help / color / mirror / Atom feed
* Question: Etherenet Link Detection
@ 2001-09-26 21:41 Robert Cantu
  2001-09-27 23:36 ` Peter Sandstrom
  0 siblings, 1 reply; 8+ messages in thread
From: Robert Cantu @ 2001-09-26 21:41 UTC (permalink / raw)
  To: linux-kernel

Is there a method of detecting the link status of an ethernet NIC? If not,
is it feasible? And if it is, then would it be something in each driver,  
or on a level above the driver, thereby available to all drivers? I figure
the list is the best place to ask this, although it might be a moot point.
                                                                
Example: Have a cable modem hooked into a computer's NIC. Cable service   
goes out, link light on back of NIC goes out. A hypothetical program says 
that the link is gone via some hook in /proc somewhere.

Is this a worthwhile endeavor, if possible?

Thanks in advance,
Robert


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

* Re: Question: Etherenet Link Detection
  2001-09-27 23:36 ` Peter Sandstrom
@ 2001-09-26 23:39   ` Matthew Dharm
  2001-09-26 23:49     ` Randy.Dunlap
  2001-09-27  0:06   ` Ben Greear
  1 sibling, 1 reply; 8+ messages in thread
From: Matthew Dharm @ 2001-09-26 23:39 UTC (permalink / raw)
  To: Peter Sandstrom; +Cc: Robert Cantu, linux-kernel

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

You can get that information from the PHY too, so if you can get to the MII
control registers, you can query the phy for link status.

Again, tho, the problem is getting that data to userland.

Matt

On Fri, Sep 28, 2001 at 01:36:07AM +0200, Peter Sandstrom wrote:
> I know for sure that the Intel 82559 Fast Ethernet embedded controller 
> has a register where it's possible to read out if the link led is active
> or not. It seems quite likely that this would be available on other
> controllers as well.
> 
> Is there any functionality in the current kernel that enables a userland
> program to read this? I mostly turn my machines on and and let them do
> their thing until the hardware fails :)
> 
> /Peter
> 
> -----Original Message-----
> From: linux-kernel-owner@vger.kernel.org
> [mailto:linux-kernel-owner@vger.kernel.org]On Behalf Of Robert Cantu
> Sent: den 26 september 2001 23:41
> To: linux-kernel@vger.kernel.org
> Subject: Question: Etherenet Link Detection
> 
> 
> Is there a method of detecting the link status of an ethernet NIC? If not,
> is it feasible? And if it is, then would it be something in each driver,  
> or on a level above the driver, thereby available to all drivers? I figure
> the list is the best place to ask this, although it might be a moot point.
>                                                                 
> Example: Have a cable modem hooked into a computer's NIC. Cable service   
> goes out, link light on back of NIC goes out. A hypothetical program says 
> that the link is gone via some hook in /proc somewhere.
> 
> Is this a worthwhile endeavor, if possible?
> 
> Thanks in advance,
> Robert
> 
> -
> 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/
> 
> 
> -
> 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/

-- 
Matthew Dharm                              Home: mdharm-usb@one-eyed-alien.net 
Maintainer, Linux USB Mass Storage Driver

Type "format c:"  That should fix everything.
					-- Greg
User Friendly, 12/18/1997

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

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

* Re: Question: Etherenet Link Detection
  2001-09-26 23:39   ` Matthew Dharm
@ 2001-09-26 23:49     ` Randy.Dunlap
  2001-09-26 23:49       ` Tim Hockin
  0 siblings, 1 reply; 8+ messages in thread
From: Randy.Dunlap @ 2001-09-26 23:49 UTC (permalink / raw)
  To: Matthew Dharm; +Cc: Peter Sandstrom, Robert Cantu, linux-kernel

Hi-

It's traditionally been defined as MII information, but that's
awfully slow, so some Ethernet controllers make it available
in a quicker manner.

ethtool might do this (http://sourceforge.net/projects/gkernel/);
I don't know for sure.

or mii-diag (http://www.scyld.com/diag/).

~Randy


Matthew Dharm wrote:
> 
> You can get that information from the PHY too, so if you can get to the MII
> control registers, you can query the phy for link status.
> 
> Again, tho, the problem is getting that data to userland.
> 
> Matt
> 
> On Fri, Sep 28, 2001 at 01:36:07AM +0200, Peter Sandstrom wrote:
> > I know for sure that the Intel 82559 Fast Ethernet embedded controller
> > has a register where it's possible to read out if the link led is active
> > or not. It seems quite likely that this would be available on other
> > controllers as well.
> >
> > Is there any functionality in the current kernel that enables a userland
> > program to read this? I mostly turn my machines on and and let them do
> > their thing until the hardware fails :)
> >
> > /Peter
> >
> > -----Original Message-----
> > From: linux-kernel-owner@vger.kernel.org
> > [mailto:linux-kernel-owner@vger.kernel.org]On Behalf Of Robert Cantu
> > Sent: den 26 september 2001 23:41
> > To: linux-kernel@vger.kernel.org
> > Subject: Question: Etherenet Link Detection
> >
> >
> > Is there a method of detecting the link status of an ethernet NIC? If not,
> > is it feasible? And if it is, then would it be something in each driver,
> > or on a level above the driver, thereby available to all drivers? I figure
> > the list is the best place to ask this, although it might be a moot point.
> >
> > Example: Have a cable modem hooked into a computer's NIC. Cable service
> > goes out, link light on back of NIC goes out. A hypothetical program says
> > that the link is gone via some hook in /proc somewhere.
> >
> > Is this a worthwhile endeavor, if possible?

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

* Re: Question: Etherenet Link Detection
  2001-09-26 23:49     ` Randy.Dunlap
@ 2001-09-26 23:49       ` Tim Hockin
  2001-09-27  0:10         ` Randy.Dunlap
  0 siblings, 1 reply; 8+ messages in thread
From: Tim Hockin @ 2001-09-26 23:49 UTC (permalink / raw)
  To: Randy.Dunlap; +Cc: Matthew Dharm, Peter Sandstrom, Robert Cantu, linux-kernel

> It's traditionally been defined as MII information, but that's
> awfully slow, so some Ethernet controllers make it available
> in a quicker manner.
> 
> ethtool might do this (http://sourceforge.net/projects/gkernel/);
> I don't know for sure.

The only interface to this is through MII, unless we want to add an ETHTOOL
style ioctl to get the link status.  This means, however, that every driver
that wants to report this needs to support at least a subset of ethtool
ioctls, which VERY FEW do.


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

* Re: Question: Etherenet Link Detection
  2001-09-27 23:36 ` Peter Sandstrom
  2001-09-26 23:39   ` Matthew Dharm
@ 2001-09-27  0:06   ` Ben Greear
  2001-09-27 14:58     ` Robert Cantu
  1 sibling, 1 reply; 8+ messages in thread
From: Ben Greear @ 2001-09-27  0:06 UTC (permalink / raw)
  To: Peter Sandstrom; +Cc: Robert Cantu, linux-kernel

Peter Sandstrom wrote:
> 
> I know for sure that the Intel 82559 Fast Ethernet embedded controller
> has a register where it's possible to read out if the link led is active
> or not. It seems quite likely that this would be available on other
> controllers as well.
> 
> Is there any functionality in the current kernel that enables a userland
> program to read this? I mostly turn my machines on and and let them do
> their thing until the hardware fails :)
> 
> /Peter

You can get this information out of any NIC that supports
the mii-diag protocols.  The two I've used are the eepro100
and tulip drivers...

You can read Becker's mii-diag source for the gory details!

Ben

-- 
Ben Greear <greearb@candelatech.com>          <Ben_Greear@excite.com>
President of Candela Technologies Inc      http://www.candelatech.com
ScryMUD:  http://scry.wanfear.com     http://scry.wanfear.com/~greear

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

* Re: Question: Etherenet Link Detection
  2001-09-26 23:49       ` Tim Hockin
@ 2001-09-27  0:10         ` Randy.Dunlap
  0 siblings, 0 replies; 8+ messages in thread
From: Randy.Dunlap @ 2001-09-27  0:10 UTC (permalink / raw)
  To: Tim Hockin; +Cc: Matthew Dharm, Peter Sandstrom, Robert Cantu, linux-kernel

Tim Hockin wrote:
> 
> > It's traditionally been defined as MII information, but that's
> > awfully slow, so some Ethernet controllers make it available
> > in a quicker manner.
> >
> > ethtool might do this (http://sourceforge.net/projects/gkernel/);
> > I don't know for sure.
> 
> The only interface to this is through MII, unless we want to add an ETHTOOL
> style ioctl to get the link status.  This means, however, that every driver
> that wants to report this needs to support at least a subset of ethtool
> ioctls, which VERY FEW do.

Right.  I think that Jeff was thinking about this for 2.5 (what's
that?),
but I'm not trying to speak for Jeff.

Or maybe this has already been discussed on these mailing lists:
  linux-net@vger.kernel.org or netdev@oss.sgi.com

~Randy

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

* Re: Question: Etherenet Link Detection
  2001-09-27  0:06   ` Ben Greear
@ 2001-09-27 14:58     ` Robert Cantu
  0 siblings, 0 replies; 8+ messages in thread
From: Robert Cantu @ 2001-09-27 14:58 UTC (permalink / raw)
  To: linux-kernel

Ben Greear wrote:

> Peter Sandstrom wrote:
> 
>>I know for sure that the Intel 82559 Fast Ethernet embedded controller
>>has a register where it's possible to read out if the link led is active
>>or not. It seems quite likely that this would be available on other
>>controllers as well.
>>
>>Is there any functionality in the current kernel that enables a userland
>>program to read this? I mostly turn my machines on and and let them do
>>their thing until the hardware fails :)
>>
>>/Peter
>>
> 
> You can get this information out of any NIC that supports
> the mii-diag protocols.  The two I've used are the eepro100
> and tulip drivers...
> 
> You can read Becker's mii-diag source for the gory details!
> 
> Ben
> 
> 

Thaniks, all who replied.

A little clarification on my project:

I'm going to try to build a userland app that manages several different 
network profiles and watches the ethernet port and notifies the user of 
a disconnect. If the user wishes, it will be configured to unload the 
network profile upon disconnect (to avoid long timeouts) and upon 
reconnction, reload that profile. A few simple subnet detection 
algorithms would try to intelligently load the correct profile. This is 
mainly a useful solution for mobile users who have to have different 
set-ups for networking. It looks like the mii-diag from Becker is going 
to work great (thanks, all who pointed me there), and is the last 
component I needed to get started. I may put the project up on 
sourceforge as my coding skills are new and weak. Thanks for the info.

As a side note, any chance such monitoring tools/interfaces might go 
into a later 2.4 or 2.5 kernel and be available in the /proc fs? That 
would be a much more elegant solution, from a user's standpoint. Again, 
thanks, all!

Cheers,
Robert Cantu
robert@tux.ou.edu


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

* RE: Question: Etherenet Link Detection
  2001-09-26 21:41 Question: Etherenet Link Detection Robert Cantu
@ 2001-09-27 23:36 ` Peter Sandstrom
  2001-09-26 23:39   ` Matthew Dharm
  2001-09-27  0:06   ` Ben Greear
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Sandstrom @ 2001-09-27 23:36 UTC (permalink / raw)
  To: Robert Cantu; +Cc: linux-kernel

I know for sure that the Intel 82559 Fast Ethernet embedded controller 
has a register where it's possible to read out if the link led is active
or not. It seems quite likely that this would be available on other
controllers as well.

Is there any functionality in the current kernel that enables a userland
program to read this? I mostly turn my machines on and and let them do
their thing until the hardware fails :)

/Peter

-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org]On Behalf Of Robert Cantu
Sent: den 26 september 2001 23:41
To: linux-kernel@vger.kernel.org
Subject: Question: Etherenet Link Detection


Is there a method of detecting the link status of an ethernet NIC? If not,
is it feasible? And if it is, then would it be something in each driver,  
or on a level above the driver, thereby available to all drivers? I figure
the list is the best place to ask this, although it might be a moot point.
                                                                
Example: Have a cable modem hooked into a computer's NIC. Cable service   
goes out, link light on back of NIC goes out. A hypothetical program says 
that the link is gone via some hook in /proc somewhere.

Is this a worthwhile endeavor, if possible?

Thanks in advance,
Robert

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



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

end of thread, other threads:[~2001-09-27 15:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-09-26 21:41 Question: Etherenet Link Detection Robert Cantu
2001-09-27 23:36 ` Peter Sandstrom
2001-09-26 23:39   ` Matthew Dharm
2001-09-26 23:49     ` Randy.Dunlap
2001-09-26 23:49       ` Tim Hockin
2001-09-27  0:10         ` Randy.Dunlap
2001-09-27  0:06   ` Ben Greear
2001-09-27 14:58     ` Robert Cantu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.