]> git.baikalelectronics.ru Git - kernel.git/commit
net: qcom/emac: add ethool support for setting pause parameters
authorTimur Tabi <timur@codeaurora.org>
Mon, 6 Feb 2017 21:34:52 +0000 (15:34 -0600)
committerDavid S. Miller <davem@davemloft.net>
Tue, 7 Feb 2017 18:18:52 +0000 (13:18 -0500)
commit690c8b0073dfbe8fea7c6b4f690073304a9bde32
tree5256b21e1e93e0040b90fbf0bfb591a7b68085ce
parent7f77f7b541e8914a8f71ebed591070c6bc7b9f37
net: qcom/emac: add ethool support for setting pause parameters

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: Timur Tabi <timur@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/emac/emac-ethtool.c
drivers/net/ethernet/qualcomm/emac/emac-mac.c
drivers/net/ethernet/qualcomm/emac/emac.c
drivers/net/ethernet/qualcomm/emac/emac.h