From: "Rafał Miłecki" <zajec5@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
Vladimir Oltean <olteanv@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: "Florian Fainelli" <f.fainelli@gmail.com>,
netdev@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com,
"Rafał Miłecki" <rafal@milecki.pl>
Subject: [PATCH net-next 3/4] net: dsa: b53: Improve flow control setup on BCM5301x
Date: Thu, 16 Sep 2021 14:03:53 +0200 [thread overview]
Message-ID: <20210916120354.20338-4-zajec5@gmail.com> (raw)
In-Reply-To: <20210916120354.20338-1-zajec5@gmail.com>
From: Rafał Miłecki <rafal@milecki.pl>
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>
---
drivers/net/dsa/b53/b53_common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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) {
--
2.26.2
next prev parent reply other threads:[~2021-09-16 12:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-16 12:03 [PATCH net-next 0/4] net: dsa: b53: Clean up CPU/IMP ports Rafał Miłecki
2021-09-16 12:03 ` [PATCH net-next 1/4] net: dsa: b53: Include all ports in "enabled_ports" Rafał Miłecki
2021-09-16 21:44 ` Florian Fainelli
2021-09-16 12:03 ` [PATCH net-next 2/4] net: dsa: b53: Drop BCM5301x workaround for a wrong CPU/IMP port Rafał Miłecki
2021-09-16 21:44 ` Florian Fainelli
2021-09-16 12:03 ` Rafał Miłecki [this message]
2021-09-16 21:44 ` [PATCH net-next 3/4] net: dsa: b53: Improve flow control setup on BCM5301x Florian Fainelli
2021-09-16 12:03 ` [PATCH net-next 4/4] net: dsa: b53: Drop unused "cpu_port" field Rafał Miłecki
2021-09-16 21:44 ` Florian Fainelli
2021-09-16 16:23 ` [PATCH net-next 0/4] net: dsa: b53: Clean up CPU/IMP ports Florian Fainelli
2021-09-16 21:46 ` Florian Fainelli
2021-09-16 22:19 ` Rafał Miłecki
2021-09-17 10:00 ` Vladimir Oltean
2021-09-17 12:21 ` Andrew Lunn
2021-09-17 12:31 ` Vladimir Oltean
2021-09-17 16:39 ` Florian Fainelli
2021-09-17 2:58 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210916120354.20338-4-zajec5@gmail.com \
--to=zajec5@gmail.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=rafal@milecki.pl \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).