Set speed/duplex on sis900 ethernet interface

Discussion in 'Linux Networking' started by AnyBody43, Sep 16, 2003.

  1. AnyBody43

    AnyBody43 Guest

    Hello,

    I am being plagued by
    Sep 16 18:38:14 mcl_x eth1: Media Link Off
    Sep 16 18:38:38 mcl_x eth1: Media Link On 10mbps half-duplex
    Sep 16 18:38:42 mcl_x NETDEV WATCHDOG: eth1: transmit timed out
    Sep 16 18:38:42 mcl_x eth1: Transmit timeout, status 00000004 00000000
    Sep 16 18:38:50 mcl_x NETDEV WATCHDOG: eth1: transmit timed out
    Sep 16 18:38:50 mcl_x eth1: Transmit timeout, status 00000004 00000000
    .......

    The problem is that if the interface goes down for any reason
    it gets broken. The Link off/on is expected it's what follows
    that is not.

    The only fix that I have at present is a reboot.

    The interface is connected to a 10mbps hub that does
    no autonegotiation.

    This seems to happen every time the interface goes down.

    When the above errors occur the interface usually becomes almost
    completely unresponsive. e.g. Ping round trip times via this
    interface range up to 5s. It is ocurring consistently on a number
    of different computers and is I believe due to a bug.

    I noticed:
    http://www.ussg.iu.edu/hypermail/linux/kernel/0203.3/0018.html

    This seems to state that the driver fails if an attempt is made to
    transmit a packet before autonegotiation is complete.

    I have therefore tried to get the interface to use settings specified
    by me but can find no way to accomplish this.

    "mii-tool -F 10baseT-HD eth1" does change it but only until it goes down
    again. When it comes back up we are in the "no negotiate" mode again.
    This means that autonegotiation is ON but that it has failed.

    I have also tried ethtool but it won't work against my driver.

    mcl_x-~#ethtool -s eth1 speed 10 duplex half autoneg off
    Cannot get current device settings: Operation not supported
    not setting speed
    not setting duplex
    not setting autoneg
    mcl_x-~#


    I have learned more about linux startup than I really want to know
    but still feel no closer to a solution.

    The hardware is a firewall appliance that uses Redhat Linux as its OS.

    uname -a
    Linux 2.4.9-34.11xxx #1 Tue Jan 28 16:53:15 CST 2003 i686 unknown

    Since it's a commercial product I am a little reluctant to fiddle
    with the code although I guess that I might be able to build a
    development system I don't even have one right now.

    Can anyone tell me if there is a way to configure the ethernet
    ports such that they NEVER negotiate at all.

    It has been suggested that increasing
    /sbin/sysctl -w net.core.netdev_max_backlog=300
    from its present value may help but I am a little worried
    that I may need to change other parameters (eg memory) too and in
    any case don't think that it will work.


    Thanks a lot for any ideas.
     
    AnyBody43, Sep 16, 2003
    #1
    1. Advertisements

  2. AnyBody43

    Neil Horman Guest

    Most phy's with an MII interface have a control register that allows you
    to disable autonegotiation. You can probably get the hardware spec for
    your particular phy, locate that bit, and make a call in the driver
    module_init routine to set it to zero. Of course, this implies that
    your modified driver will always need to have it speed/duplex abilities
    set according to what the system is connected to.

    HTH
    Neil

    --
    /***************************************************
    *Neil Horman
    *Software Engineer
    *Red Hat, Inc.
    *
    *gpg keyid: 1024D / 0x92A74FA1
    *http://www.keyserver.net
    ***************************************************/
     
    Neil Horman, Sep 17, 2003
    #2
    1. Advertisements

  3. AnyBody43

    AnyBody43 Guest

    Loads snipped from my original message

    Well it's "a way"!!!!!:)

    I could manage this I would think since, I have done some stuff
    like it in the past. One problem is that the boxes have 3
    interfaces and we always use 2 of them at least. It may be
    difficult to have them all set to the same value.
    This could mean making more changes to the code than I might like.
    Setting a bit is not too bad, parameterising a whole new section
    of code is a bit of a bigger step for me.

    Thanks a lot for the input, will for sure let you know if I
    do the hack. This is unlikely since these are commercial
    products that we have "support" for and it would be a bigish effort
    for me to get a development system going, and also due to the issue
    above.

    Hopefully the "support" will fix it eventually. BTW I am still looking
    for something a little less drastic:)

    Thanks again.
     
    AnyBody43, Sep 17, 2003
    #3
  4. AnyBody43

    Googlizer Guest

    -snip-
    I am being plagued by
    Sep 16 18:38:14 mcl_x eth1: Media Link Off
    Sep 16 18:38:38 mcl_x eth1: Media Link On 10mbps half-duplex
    Sep 16 18:38:42 mcl_x NETDEV WATCHDOG: eth1: transmit timed out
    Sep 16 18:38:42 mcl_x eth1: Transmit timeout, status 00000004 00000000
    Sep 16 18:38:50 mcl_x NETDEV WATCHDOG: eth1: transmit timed out
    Sep 16 18:38:50 mcl_x eth1: Transmit timeout, status 00000004 00000000
    .......
    -snip-


    Yo Anybody, greetz from the east,

    Have you tried /etc/init.d/network restart? Might save you a reboot.
    How about buying a new hub/switch. They go for under $20.

    Create a script for mii-tool and cron it and a network restart? At
    least for the evenings when you'd rather not come in. I know that's
    cheesy, but until a real solution comes, duct tape is better than no
    tape.

    By the way, it looks like you could use a kernel upgrade on that
    puppy. I know how it is with firewall products, it's like the "Wizard
    of OZ, and don't bug the man behind the curtin". This risk is
    bringing down connectivity and zillions of web surfers (oops, I mean
    employees) jumping your stuff. As it is, it sounds like you're not on
    their birthday gift list.

    I'm having a problem with 10Mbit settings not being retained through
    the reboot, but 100 seems to work. RH 7.3 recently kerneled and
    patched.

    mvshk
     
    Googlizer, Oct 7, 2003
    #4
  5. AnyBody43

    AnyBody43 Guest

    Thanks,
    Been there with most of that but it was a (very) good read anyway.

    I'm in the UK, is that east?
     
    AnyBody43, Oct 30, 2003
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.