• Timur Tabi's avatar
    net: qcom/emac: add ethool support for setting pause parameters · b44700e9
    Timur Tabi authored
    To support setting the pause parameters, the driver can no longer just
    mirror the PHY.  The set_pauseparam feature allows the driver to
    force the setting in the MAC, regardless of how the PHY is configured.
    This means that we now need to maintain an internal state for pause
    frame support, and so get_pauseparam also needs to be updated.
    
    If the interface is already running when the setting is changed, then
    the interface is reset.
    
    Note that if the MAC is configured to enable RX pause frame support
    (i.e. it transmits pause frames to throttle the other end), but the
    PHY is configured to block those frames, then the feature will not work.
    
    Also some buffer size initialization code into emac_init_adapter(),
    so that it lives with similar code, including the initializtion of
    pause frame support.
    Signed-off-by: default avatarTimur Tabi <timur@codeaurora.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b44700e9
emac.c 19.1 KB