• Yinjun Zhang's avatar
    nfp: add support for link auto negotiation · 8d545385
    Yinjun Zhang authored
    Report the auto negotiation capability if it's supported
    in management firmware, and advertise it if it's enabled.
    Changing port speed is not allowed when autoneg is enabled.
    
    The ethtool <intf> command displays the auto-neg capability:
    
      # ethtool enp1s0np0
      Settings for enp1s0np0:
              Supported ports: [ FIBRE ]
              Supported link modes:   Not reported
              Supported pause frame use: Symmetric
              Supports auto-negotiation: Yes
              Supported FEC modes: None        RS      BASER
              Advertised link modes:  Not reported
              Advertised pause frame use: Symmetric
              Advertised auto-negotiation: Yes
              Advertised FEC modes: None       RS      BASER
              Speed: 25000Mb/s
              Duplex: Full
              Auto-negotiation: on
              Port: FIBRE
              PHYAD: 0
              Transceiver: internal
              Link detected: yes
    Signed-off-by: default avatarYinjun Zhang <yinjun.zhang@corigine.com>
    Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
    Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
    8d545385
nfp_main.c 23.5 KB