On Mon, 2005-11-21 at 10:12 -0800, Jesse Brandeburg wrote: > Hi, thanks for the input. I have a couple of questions.
Hi Jesse > Why do you need this? Basically this was a design decision in our > driver to not report link when we haven't had a chance to initialize > it (when the interface is brought up) If I configure an interface to disable autonegotiation I'd like to be able to tell how the interface is configured, iow what will happen when I connect it to a switch that is set to 100-full? Will I get a duplex mismatch or not? Sometimes you don't connect a device just after you've configured it, sometimes you get interrupted by other things, and then when you are about to connect the interface to the switch it's really nice to be able to visually confirm (by visually confirm I mean read-out the actual settings of the interface and see if that matches the other end of the link) that the settings of both the interface and the switch are really as they are supposed to be. The visual confirmation part is almost neccessary when you are under time pressure to get things working and you are about to replace parts of a production network. This is something you can do with almost all network equipment out there. By bringing up an interface, do you mean setting IFF_UP or detecting a link-beat? if you mean the former your explanation and the current behaviour doesn't match, simply setting IFF_UP doesn't make the driver report the current settings when autoneg is turned off. It only reports the current speed/duplex when a link-beat is detected, doesn't matter if autoneg is turned on or off, the behaviour is the same. > Unless you can give me a really good reason or precendent in the > kernel to change our design decision, I don't think this change is > worth it. Reading the source for drivers using mii_ethtool_gset() in order to get the settings it doesn't seem like any of them behave diffrently if the interface is up or down. This includes drivers like e100, 3c59x, eepro100, 8139too, 8139cp. But, mii_ethtool_gset() doesn't set speed or duplex to 0xffff (unknown) like e1000/ixgb does when autoneg is turned on which I think is more correct. But they do appear to report the speed/duplex even if the interface doesn't detect a link-beat, e1000/ixgb doesn't do this (should only be done when autoneg is turned off) I use e1000 everywhere I use Linux and gigE, this has been an itch that I now wanted to scratch. -- /Martin
signature.asc
Description: This is a digitally signed message part