diff options
author | Timur Tabi <timur@codeaurora.org> | 2017-02-07 00:34:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-02-07 21:18:52 +0300 |
commit | b44700e975848a9a569a509244672ff886ec99b3 (patch) | |
tree | 5256b21e1e93e0040b90fbf0bfb591a7b68085ce /drivers/net/ethernet/qualcomm/emac/emac.h | |
parent | 29ba6e7400a317725bdfb86a725d1824447dbcd7 (diff) | |
download | linux-b44700e975848a9a569a509244672ff886ec99b3.tar.xz |
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>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/emac/emac.h')
-rw-r--r-- | drivers/net/ethernet/qualcomm/emac/emac.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.h b/drivers/net/ethernet/qualcomm/emac/emac.h index ef91dcc7f646..e77fb6966cbb 100644 --- a/drivers/net/ethernet/qualcomm/emac/emac.h +++ b/drivers/net/ethernet/qualcomm/emac/emac.h @@ -306,6 +306,13 @@ struct emac_adapter { unsigned int rxbuf_size; + /* Flow control / pause frames support. If automatic=True, do whatever + * the PHY does. Otherwise, use tx_flow_control and rx_flow_control. + */ + bool automatic; + bool tx_flow_control; + bool rx_flow_control; + /* Ring parameter */ u8 tpd_burst; u8 rfd_burst; |