This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/ETHERNET-SW: 100BASE-FX Link drop not detected.

Part Number: ETHERNET-SW
Other Parts Discussed in Thread: DP83822HF, AM5728,

Tool/software: Linux

Hi,

I am using two DP83822HF chips in 100BASE-FX Mode .

But there is a problem.

The problem is that two ports can not communicate at the same time.

I have quastion.

1. Why does not link drop occur in fx mode?

Even if you delete a connection in fx mode, link status is always in the link on state.

 

2. Why is Flow control off in FX-mode? 

In FX-mode, Flow control is off as shown below.
"Eth 2: Link is Up - 100 Mbps / Full - flow control off"
"Eth 3: Link is Up - 100 Mbps / Full - flow control off"

However, in TX-mode, Flow control is On as shown below.
"Eth 2: Link is Up - 100 Mbps / Full - flow control rx / tx"
"Eth 3: Link is Up - 100 Mbps / Full - flow control rx / tx"

 

this is phy chip regster log

==== DP83822HF_config_intr 246===
BMCR(0x0): 0x2100
BMSR(0x1): 0x784d
BMSR(0x1): 0x784d
PHYIDR1(0x2): 0x2000
PHYIDR2(0x3): 0xa240
CR1(0x9): 0x0
CR2(0xa): 0x4100
FLDSTS(0xF): 0x0
PHYSTS(0x10): 0x205
PHYSCR(0x11): 0x109
RCSR(0x17): 0x41
LEDCR(0x18): 0x400
PHYCR(0x19): 0x21
GENCFG(0x465): 0xff00
=================

Best Regards,

John Kim

  • Hi John,

    Please explain how you are 'deleting' a connection.
    I am not sure what you mean by this.
    Are you removing the fiber cable or are you completely removing the fiber transceiver?

    What do you mean by flow control?

    Thank you,
    Ross
  • Hi Ross


    'Deleting' means removal of fiber optic cable.
    I removing fiber cable, but link status is always in the link on state..

    Conversely, the link drop is detected well in TX-mode.

     

    And

    'Flow control' means TX Pause.

    If you look at the code of the device driver, 'Tx pause' works only in TX-mode.



    Best regards,
    John kim

  • Hi,

    Have you connected  "signal detect" signal of DP83822  to your optical transreciever ?

    Regards,
    Geet

  • Him

    Yes, signal detect is connected to pin 24 of the DP83822HF.
    and, 'RX_ER'pin's boot strap is set to mode 1 (pull down / signal detect enable).

    Best Regards,
    John Kim
  • Hi John,

    Can you try mode 4 on RX_ER ( pin 24) ?

    Also ensure Signal Detect polarity is set according to Optical Transceiver signalling.

    Regards,
    Geet

  • Hi Geet,

    Signal Detect pin is LED_1 (pin 24)
    SD_DIS Boot strap pin is RX_ER(pin 28)

    in data sheet,
    When the setting of SD_DIS Boot Strap mode becomes 4,
    Signal Detect signal is not received by LED_1 pin. (Disable).

    Best Regards,
    John Kim
  • This is an error in Datasheet and we are working to make an update to Datasheet.

    RX_ER strap mode 4, SD_DIS = 0 i.e. SD_FX detection is enabled.

    Can you please change the the strap to mode4 and confirm ?

    Regards,

    Geet

  • Hi,

    I changed the 'boot strap' of the RX_ER pin to mode 4.
    But, the problem was not solved.

     

    How does DP83822HF detect Link Drop?

     

    Best Regards,
    John Kim

  • - Kindly confirm Signal Detect polarity of Optical Transrecieves matches with DP83822 configuration. You can refer/change the polarity using register 0x0465. By default Signal Detect polarity is ACTIVE low
    - Can you read and share 0x0010 in both condition : with cable connected and packet transfer. With cable removed.


    Regards,
    Geet
  • Hi, Geet

    I read the register in phy_device.c's genphy_update_link function.

    It is interesting.
    After connecting the optical fiber cable, the status of the DP83822HF chip is not displayed.

    1. AM5728 Boot log
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)          -> KSZ9031 - TX mode
    libphy: ID: 0x2000a240 / Link Status : DOWN(0x204)  -> DP83822HF - FX mode
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x2000a240 / Link Status : DOWN(0x204)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x2000a240 / Link Status : DOWN(0x204)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x2000a240 / Link Status : DOWN(0x204)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x2000a240 / Link Status : DOWN(0x204)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x2000a240 / Link Status : DOWN(0x204)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x2000a240 / Link Status : DOWN(0x204)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x2000a240 / Link Status : DOWN(0x204)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x2000a240 / Link Status : DOWN(0x204)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)

    2. eth3 cable connected
    libphy: ID: 0x2000a240 / Link Status : UP(0x205)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    eth3: Link is Up - 100Mbps/Full - flow control off
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)

    3. eth3 cable removed
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)
    libphy: ID: 0x221622 / Link Status : DOWN(0x0)

    Best Regards,
    John Kim

  • Hi Kim,

    Looks like that's the driver limitation. Its not showing the status for the second phy as well.


    I would like to read following registers of the DP83822 Phy with both Fiber cable connected and disconnected.
    a) 0x0467
    b) 0x0465
    c) 0x468
    d) 0x000A
    e) 0x0010

    Regards,
    Geet
  • Hi Geet,

    After connecting the fiber optic cable, no debug messages will be issued and registers can not be read.

    Also, "ethtool" can not be read...
    # Ethtool-i eth 2
    Driver: PRUSS Ethernet driver
    Version: 0.2
    Firmware-version:
    Expansion-rom-version:
    Bus-info:
    Supports-statistics: yes
    Supports-test: no
    Supports-eeprom-access: no
    Supports-register-dump: no
    Supports-priv-flags: no

    Please tell me if there is a way to read this register.

    Best Regards,
    John Kim

  • These are phy level registers. You need to have MDIO/MDC access on board to use the USB-MDIO tool to read the registers.

    www.ti.com/.../usb-2-mdio


    Regards,
    Geet
  • Hi Geet,

    My board does not have a way to access USB-MDIO.

    I have to buy the MSP430F5 Series LaunchPad,
    It takes a long time to receive the board.

    In this situation, I can only read information using 'ethtool'.
    When I read the status of the DP83822HF with 'ethtool'
    Even if the optical cable is removed, Link Detected always comes out to Yes.

    Best Regards,
    John Kim
  • Are you able to read registers while the fiber cable is connected ?
  • After connecting the fiber optic cable, no debug messages will be issued and registers can not be read.

    I have one question.
    What is a driver limitation?
  • Please reach out to team supporting the driver.

    Regards,
    Geet
  • Sorry, I don't know where the team is supporting the driver.
    I posted the question on the Ethernet Forum with Linux / ETHERNET-SW from the beginning,

    Should I ask a question on the Linux Forum?

    Regards,
    John Kim