Skip to content

[Accton] Fixes to AS4630-54TE sfp.py for sfputil usage #8985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

seanwu-ec
Copy link
Contributor

@seanwu-ec seanwu-ec commented Oct 15, 2021

Why I did it

Fix the exception or malfunction while:

  1. $ sfputil show eeprom
  2. $ sfputil lpmode on/off EthernetXX
  3. $ sfputil reset EthernetXX

How I did it

Referenced to AS4630-54PE's code in #8241 majorly because they share use the same CPLD FW.

How to verify it

Confirm sfputil eeprom/lpmode/reset cmd can work.
At the same time, check if the CPLD reg values are the same as expected.

root@sonic:/home/admin# sfputil show eeprom
Ethernet0: SFP EEPROM not detected
Ethernet1: SFP EEPROM not detected
Ethernet2: SFP EEPROM not detected
...
Ethernet52: SFP EEPROM detected
        Application Advertisement: N/A
        Connector: Unknown or unspecified
        Encoding: Unspecified
        Extended Identifier: Power Class 1(1.5W max)
        Extended RateSelect Compliance: QSFP+ Rate Select Version 1
        Identifier: Unknown or unspecified
        Length Cable Assembly(m): 0
        Nominal Bit Rate(100Mbs): 0
        Specification compliance:
        Vendor Date Code(YYYY-MM-DD Lot): 20-- 
        Vendor Name: 
        Vendor OUI: 00-00-00
        Vendor PN: 
        Vendor Rev: 
        Vendor SN: 

Ethernet56: SFP EEPROM detected
        Application Advertisement: N/A
        Connector: No separable connector
        Encoding: Unspecified
        Extended Identifier: Power Class 4(3.5W max)
        Extended RateSelect Compliance: QSFP+ Rate Select Version 1
        Identifier: QSFP+ or later
        Length Cable Assembly(m): 0
        Nominal Bit Rate(100Mbs): 103
        Specification compliance:
                10/40G Ethernet Compliance Code: 40GBASE-CR4
        Vendor Date Code(YYYY-MM-DD Lot): 2014-11-06 
        Vendor Name: Accton
        Vendor OUI: cc-4e-24
        Vendor PN: F0OZZGIGA004
        Vendor Rev: 0B
        Vendor SN: CRH0000000000000

root@sonic:/home/admin# sfputil show lpmode -p Ethernet52
Port        Low-power Mode
----------  ----------------
Ethernet52  Off
root@sonic:/home/admin# sfputil lpmode on Ethernet52
Enabling low-power mode for port Ethernet52 ... OK
root@sonic:/home/admin# sfputil show lpmode -p Ethernet52
Port        Low-power Mode
----------  ----------------
Ethernet52  On
root@sonic:/home/admin# sfputil lpmode off Ethernet52
Disabling low-power mode for port Ethernet52 ... OK
root@sonic:/home/admin# sfputil show lpmode -p Ethernet52
Port        Low-power Mode
----------  ----------------
Ethernet52  Off

root@sonic:/# sfputil reset Ethernet56
Resetting port Ethernet56 ... OK

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012 : some of our customers demands it.
  • 202106 : some of our customers demands it.

Description for the changelog

[Accton] Fixes to AS4630-54TE sfp.py for sfputil usage

A picture of a cute animal (not mandatory but encouraged)

Alt Text

seanwu-ec and others added 2 commits October 15, 2021 01:28
* Fix KeyError exception while sfputil show eeprom.
* Implement reset/lpmode related APIs, which need PR8115's sysfs.
* Fix EEPROM byte offset in several APIs
* Fix typos
* Implement get_position_in_parent() and is_replaceable()

Signed-off-by: Sean Wu <[email protected]>
@prgeor prgeor self-assigned this Jan 18, 2022
@prgeor
Copy link
Contributor

prgeor commented Feb 6, 2022

/azp Azure.sonic-buildimage

@azure-pipelines
Copy link

Command 'Azure.sonic-buildimage' is not supported by Azure Pipelines.

Supported commands
  • help:
    • Get descriptions, examples and documentation about supported commands
    • Example: help "command_name"
  • list:
    • List all pipelines for this repository using a comment.
    • Example: "list"
  • run:
    • Run all pipelines or specific pipelines for this repository using a comment. Use this command by itself to trigger all related pipelines, or specify specific pipelines to run.
    • Example: "run" or "run pipeline_name, pipeline_name, pipeline_name"
  • where:
    • Report back the Azure DevOps orgs that are related to this repository and org
    • Example: "where"

See additional documentation.

@prgeor
Copy link
Contributor

prgeor commented Feb 6, 2022

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@prgeor prgeor merged commit 7e89fad into sonic-net:master Feb 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants