summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/b53
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2021-09-16 14:03:53 +0200
committerJakub Kicinski <kuba@kernel.org>2021-09-16 19:06:36 -0700
commit3ff26b29230c54fea2353b63124c589b61953e14 (patch)
tree427a43948573e68b38d85bedf56997b7774811c7 /drivers/net/dsa/b53
parentb290c6384afabbca5ae6e2af72fb1b2bc37922be (diff)
downloadlinux-3ff26b29230c54fea2353b63124c589b61953e14.tar.gz
linux-3ff26b29230c54fea2353b63124c589b61953e14.tar.bz2
linux-3ff26b29230c54fea2353b63124c589b61953e14.zip
net: dsa: b53: Improve flow control setup on BCM5301x
According to the Broadcom's reference driver flow control needs to be enabled for any CPU switch port (5, 7 or 8 - depending on which one is used). Current code makes it work only for the port 5. Use dsa_is_cpu_port() which solved that problem. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Tested-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/dsa/b53')
-rw-r--r--drivers/net/dsa/b53/b53_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/b53/b53_common.c b/drivers/net/dsa/b53/b53_common.c
index ca84e32baca0..13f337a102ba 100644
--- a/drivers/net/dsa/b53/b53_common.c
+++ b/drivers/net/dsa/b53/b53_common.c
@@ -1222,7 +1222,7 @@ static void b53_adjust_link(struct dsa_switch *ds, int port,
return;
/* Enable flow control on BCM5301x's CPU port */
- if (is5301x(dev) && port == dev->cpu_port)
+ if (is5301x(dev) && dsa_is_cpu_port(ds, port))
tx_pause = rx_pause = true;
if (phydev->pause) {