Re: Full Duplex Ethernet - VxWorks

This is a discussion on Re: Full Duplex Ethernet - VxWorks ; Paul Slocum wrote: >We are using a PPC8260 and an Intel LXT905 Ethernet interface. We were >having some odd problems of incoming packets being retransmitted when >there was heavy outgoing traffic. > >After a lot of work looking into this, ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Re: Full Duplex Ethernet

  1. Re: Full Duplex Ethernet

    Paul Slocum wrote:

    >We are using a PPC8260 and an Intel LXT905 Ethernet interface. We were
    >having some odd problems of incoming packets being retransmitted when
    >there was heavy outgoing traffic.
    >
    >After a lot of work looking into this, I examined the LXT905 and
    >noticed that the line going to the chip that enables full-duplex mode
    >was NOT enabled. So from the schematic I figured out that port C2
    >controls this and forced it to full duplex in one of my startup
    >routines. But this doesn't seem to make a difference, and the ethernet
    >switch seems to indicate that it is still in half duplex.
    >
    >My question is: do changes need to be made to the driver to get full
    >duplex working? Is the LXT905 maybe not negotiating full duplex since
    >the vxworks startup routines are initially setting it to half duplex
    >and my code is changing it to full duplex a moment later?


    That's a possibility. Another possibility is that your driver sets the port
    back to the state it is configured to be in after you set it. In any event,
    it seems better to configure the driver for the way you want it run rather
    than attempting to changing its parameters "behind its back". See your
    driver's docs and your BSP's configNet.h file.

    >thanks in advance for any help,


    HTH

    --
    ================================================== ======================
    Michael Kesti | "And like, one and one don't make
    | two, one and one make one."
    mrkesti at hotmail dot com | - The Who, Bargain

  2. Re: Full Duplex Ethernet

    Paul Slocum wrote:
    > > That's a possibility. Another possibility is that your driver sets the port
    > > back to the state it is configured to be in after you set it. In any event,
    > > it seems better to configure the driver for the way you want it run rather
    > > than attempting to changing its parameters "behind its back". See your
    > > driver's docs and your BSP's configNet.h file.

    >
    > I had verified that is not a problem by checking the level on the pin
    > that controls full/half duplex on the ethernet interface. But I have
    > now modified the ethernet driver anyway. And I also verified that the
    > PPC's ethernet settings are set to full duplex. The ethernet switch
    > still appears to indicate that the interface is in half-duplex and
    > we're still having the same communication problems as before...
    >
    > -paul


    You didn't specify exactly what 8260 board you're using, but I'm
    guessing that it's one of the Wind River wrSbc8260 boards (it could
    also be a wrSbc8260Atm or a wrSbcPowerQuiccII (8265) board). These
    boards actually support ethernet in two ways: using the 8260's SCC
    controller or the FCC controller. The really old wrSbc8260 boards only
    had one on-board RJ45 port though, which was wired to SCC0 and would
    give you 10Mbps ethernet only. You could also use a plug-in MII
    transceiver module to use FCC0, which would give you 10/100 ethernet.
    The wrSbc8260Atm has the 10/100 transceiver on board along with a
    second RJ45 jack, so you don't need the plug-in module. The 8265 board
    has 4 ports: SCC0, FCC0, FCC1 and FCC2.

    First of all, you should really be using FCC0 on your board if
    possible. There's no reason to use the 10Mbps only SCC0 port when the
    10/100 FCC0 port is available (unless maybe your own product won't be
    using the FCC ports).

    Second, you're correct about the duplex select pin on the LXT905 PHY
    being wired to port C2 on the 8260, and yes, by default the PHY is
    configured for full duplex mode. However, this is a mistake. It really
    should have been designed to default to half duplex. This is because
    the LXT905 PHY does _not_ support autonegotiation. (This, I think, is
    because the SCC port doesn't support the use of MII compliant PHYs like
    the FCC port does.)

    When two autoneg-capable PHYs are connected together, each will
    advertise the modes it supports to the other. Both PHYs will then
    compare their link partner's abilities against their own and select the
    best mode the have in common. The best mode is 100Mbps full duplex,
    followed by 100Mbps half duplex, 10Mbps full duplex, and 10Mbps half
    duplex bringing up the rear.

    If an autoneg-capable PHY is connected to a non-autoneg capable PHY,
    different rules apply. The non-autoneg-capable PHY will just sit there.
    The autoneg-capable PHY won't be able to complete an NWAY autoneg
    handshake with its link partner, at which point it will fall back to
    parallel detection mode. This will allow the autoneg-capable PHY to
    determine the link speed, but it won't be able to tell if the link is
    full or half duplex. The convention in this case is to select half
    duplex, based on the assumption that a link partner which does not
    support NWAY autonegotiation is probably a legacy device that can't do
    full duplex anyway.

    Basically, you want to use half duplex by default, because that's the
    mode which will work correctly in most cases. You should do the
    following:

    - Configure port C2 as an output and force it high, not low. This
    should program the LXT905 PHY for half duplex mode

    - Make sure the FDE (full duplex enable) and LPB (loopback operation)
    bits in the PSRM register for SCC0 are both clear (I think this is the
    default setting)

    This will insure both the MAC and PHY are set to half duplex mode.
    (Note that it is important that both the MAC and PHY agree.)

    Once you do this, the switch and the 8260 board will both be operating
    in half duplex. You will see collisions of course, but that's normal
    with half duplex ethernet. Right now, you have a duplex mismatch (the
    target is set to full duplex and the switch is set to half), which will
    cause serious performance degredation (many packets will be lost, which
    will cause very bursty TCP throughput).

    So what use is full duplex on the SCC0 port then, you may ask?

    The rule with non-autoneg-capable devices that support full duplex is
    that full duplex mode should be manually enabled by the administrator,
    who hopefully is able to set full duplex mode on both link partners. If
    you have a managed switch which allows individual ports to be
    configured, then you can manually set it to 10Mbps full duplex. Note
    however that this may disable autonegotiation, so if you ever decide to
    use the switch port for something else, remember to set it back to
    autoneg mode when you're done with it. If your switch is not managed
    (which is the case with most consumer grade switches/hubs), and you're
    hell bent on using SCC0 for ethernet, then you'll just have to make do
    with half duplex.

    -Bill


+ Reply to Thread