• Dan Williams's avatar
    usb-net/pegasus: fix pegasus carrier detection · c43c49bd
    Dan Williams authored
    Broken by 4a1728a2 which switched the
    return semantics of read_mii_word() but didn't fix usage of
    read_mii_word() to conform to the new semantics.
    
    Setting carrier to off based on the NO_CARRIER flag is also incorrect as
    that flag only triggers on TX failure and therefore isn't correct when
    no frames are being transmitted.  Since there is already a 2*HZ MII
    carrier check going on, defer to that.
    
    Add a TRUST_LINK_STATUS feature flag for adapters where the LINK_STATUS
    flag is actually correct, and use that rather than the NO_CARRIER flag.
    Signed-off-by: default avatarDan Williams <dcbw@redhat.com>
    Signed-off-by: default avatarJeff Garzik <jeff@garzik.org>
    c43c49bd
pegasus.h 10.5 KB