Skip to content
  • Gabriel L. Somlo's avatar
    e1000: improve auto-negotiation reporting via mii-tool · 6883b591
    Gabriel L. Somlo authored
    
    
    Using mii-tool (on F20-live), the following output is produced:
    
      SIOCGMIIREG on ens3 failed: Input/output error
      ens3: no autonegotiation, 1000baseT-FD flow-control, link ok
    
    The first line (SIOCGMIIREG error) is due to mii-tool's inability
    to read the PHY auto-negotiation expansion register.
    On the second line, "no autonegotiation" is wrong, and caused by
    the absence of a flag in the link partner ability register which
    would indicate that our link partner has acked us. This flag is
    listed as "reserved" in the Intel e1000 manual, but mii-tool uses
    it as LPA_LPACK from /usr/include/linux/mii.h.
    
    This patch adds read access to PHY_AUTONEG_EXP and defines the
    link partner ack flag, allowing mii-tool to generate output as
    normally expected:
    
      ens3: negotiated 1000baseT-FD flow-control, link ok
    
    Signed-off-by: default avatarGabriel Somlo <somlo@cmu.edu>
    Reviewed-by: default avatarAlexander Graf <agraf@suse.de>
    Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
    Reviewed-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
    
    6883b591