Re: MII-less network card support



On Mon, 2005-01-31 at 18:48 +0100, Bart Vanbrabant wrote:
> Hello,
> 
> I've been looking into the sk98lin driver today and did some mailing
> with syskonnect (the company that made the driver) and this driver
> doesn't support the MII stuff but is does print out a message into
> /var/log/messages when you plug in a cable and plug it out again. So it
> must be possible to detect this in some sort of way.
> 
> Bart

If its able to do that, then what needs to happen is that code that
notices the link state change needs to get hooked up the the kernel's
rtnetlink sockets support and call the netif_carrier_on
()/netif_carrier_off() calls which send these events out to user-space.
Unfortunately, I'm unsure of the way to verify that a certain driver
actually calls netif_carrier_*() functions since I don't think link-
detection capability is exported by drivers explicitly.  2.6.10 has a
new "carrier" file in sysfs (/sys/class/net/<interface>/carrier) that is
supposed to expose the drivers carrier state, but I have no idea what it
says when the driver doesn't actually support link-detection.

Technically no, we shouldn't be using MII registers directly since lack
of MII doesn't mean no link checking (and MII calls randomly crash
certain network cards), but unless we figure out another way to
determine whether or not cards support this capability, we have no
better choice...

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]