141-net-mvneta-enable-flow-control-for-fixed-connections.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. From 4c3e2dc08a11fb1273ca62467f1d06e59866bad3 Mon Sep 17 00:00:00 2001
  2. From: Russell King <rmk+kernel@armlinux.org.uk>
  3. Date: Tue, 12 Jul 2016 00:04:13 +0100
  4. Subject: [PATCH 729/744] net: mvneta: enable flow control for fixed
  5. connections
  6. Allow symetric flow control to be enabled for fixed link connections as
  7. well as other types of connections by setting the supported and
  8. advertised capability bits.
  9. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
  10. ---
  11. drivers/net/ethernet/marvell/mvneta.c | 11 +++++++----
  12. 1 file changed, 7 insertions(+), 4 deletions(-)
  13. --- a/drivers/net/ethernet/marvell/mvneta.c
  14. +++ b/drivers/net/ethernet/marvell/mvneta.c
  15. @@ -3114,9 +3114,9 @@ static int mvneta_mac_support(struct net
  16. switch (mode) {
  17. case MLO_AN_8023Z:
  18. state->supported = SUPPORTED_1000baseT_Full |
  19. - SUPPORTED_Autoneg | SUPPORTED_Pause;
  20. + SUPPORTED_Autoneg;
  21. state->advertising = ADVERTISED_1000baseT_Full |
  22. - ADVERTISED_Autoneg | ADVERTISED_Pause;
  23. + ADVERTISED_Autoneg;
  24. state->an_enabled = 1;
  25. break;
  26. @@ -3127,18 +3127,21 @@ static int mvneta_mac_support(struct net
  27. state->supported = PHY_10BT_FEATURES |
  28. PHY_100BT_FEATURES |
  29. SUPPORTED_1000baseT_Full |
  30. - SUPPORTED_Pause |
  31. SUPPORTED_Autoneg;
  32. state->advertising = ADVERTISED_10baseT_Half |
  33. ADVERTISED_10baseT_Full |
  34. ADVERTISED_100baseT_Half |
  35. ADVERTISED_100baseT_Full |
  36. ADVERTISED_1000baseT_Full |
  37. - ADVERTISED_Pause |
  38. ADVERTISED_Autoneg;
  39. state->an_enabled = 1;
  40. break;
  41. }
  42. +
  43. + /* All modes support flow control */
  44. + state->supported |= SUPPORTED_Pause;
  45. + state->advertising |= ADVERTISED_Pause;
  46. +
  47. return 0;
  48. }