0028-ag71xx-workaround-some-link-state-bug.patch 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 02dc26588275d19a49d47abf2210c41b071cd796 Mon Sep 17 00:00:00 2001
  2. From: Phil Sutter <phil@nwl.cc>
  3. Date: Sat, 28 Jun 2014 17:07:52 +0200
  4. Subject: [PATCH] ag71xx: workaround some link state bug
  5. This happens when routing 100mbit/s traffic with masquerading, link
  6. supposedly drops to 10HD for a few seconds leading to the driver
  7. reinitialising the NIC and therefore causing a throughput drop. Ignoring
  8. those link changes allows for constant bandwidth, therefore this seems
  9. not to be a real problem of the hardware but one of an overreacting
  10. driver.
  11. ---
  12. drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c | 10 +++++++++-
  13. 1 file changed, 9 insertions(+), 1 deletion(-)
  14. diff --git a/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c b/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
  15. index 9de77e9..a83707e 100644
  16. --- a/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
  17. +++ b/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c
  18. @@ -25,7 +25,15 @@ static void ag71xx_phy_link_adjust(struct net_device *dev)
  19. if (phydev->link) {
  20. if (ag->duplex != phydev->duplex
  21. || ag->speed != phydev->speed) {
  22. - status_change = 1;
  23. + /* Completely ignore speed/duplex changes as long
  24. + * as the link stays up as they're probably spurious
  25. + * (the internal link should not change any way).
  26. + *
  27. + * This is actually a workaround, as the link seems to
  28. + * drop to 10HD from 1000FD under routing load when at
  29. + * least masquerading is also in use.
  30. + */
  31. + //status_change = 1;
  32. }
  33. }
  34. --
  35. 1.8.5.3