From: Asmaa Mnebhi <asmaa@nvidia.com>
To: <davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <olteanv@gmail.com>
Cc: Asmaa Mnebhi <asmaa@nvidia.com>, <netdev@vger.kernel.org>,
<davthompson@nvidia.com>
Subject: [PATCH v3 3/3] mlxbf_gige: Enable the GigE port in mlxbf_gige_open
Date: Fri, 22 Sep 2023 13:36:26 -0400 [thread overview]
Message-ID: <20230922173626.23790-4-asmaa@nvidia.com> (raw)
In-Reply-To: <20230922173626.23790-1-asmaa@nvidia.com>
At the moment, the GigE port is enabled in the mlxbf_gige_probe
function. If the mlxbf_gige_open is not executed, this could cause
pause frames to increase in the case where there is high backgroud
traffic. This results in clogging the port.
So move enabling the OOB port to mlxbf_gige_open.
Fixes: f92e1869d74e ("Add Mellanox BlueField Gigabit Ethernet driver")
Signed-off-by: Asmaa Mnebhi <asmaa@nvidia.com>
Reviewed-by: David Thompson <davthompson@nvidia.com>
---
v2->v3:
- No changes
v1->v2:
- Fix typo: "base" to "priv->base"
.../ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
index fd4fac1ca26c..e74946b802a9 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c
@@ -130,9 +130,15 @@ static int mlxbf_gige_open(struct net_device *netdev)
{
struct mlxbf_gige *priv = netdev_priv(netdev);
struct phy_device *phydev = netdev->phydev;
+ u64 control;
u64 int_en;
int err;
+ /* Perform general init of GigE block */
+ control = readq(priv->base + MLXBF_GIGE_CONTROL);
+ control |= MLXBF_GIGE_CONTROL_PORT_EN;
+ writeq(control, priv->base + MLXBF_GIGE_CONTROL);
+
err = mlxbf_gige_request_irqs(priv);
if (err)
return err;
@@ -365,7 +371,6 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
void __iomem *plu_base;
void __iomem *base;
int addr, phy_irq;
- u64 control;
int err;
base = devm_platform_ioremap_resource(pdev, MLXBF_GIGE_RES_MAC);
@@ -380,11 +385,6 @@ static int mlxbf_gige_probe(struct platform_device *pdev)
if (IS_ERR(plu_base))
return PTR_ERR(plu_base);
- /* Perform general init of GigE block */
- control = readq(base + MLXBF_GIGE_CONTROL);
- control |= MLXBF_GIGE_CONTROL_PORT_EN;
- writeq(control, base + MLXBF_GIGE_CONTROL);
-
netdev = devm_alloc_etherdev(&pdev->dev, sizeof(*priv));
if (!netdev)
return -ENOMEM;
--
2.30.1
next prev parent reply other threads:[~2023-09-22 17:36 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-22 17:36 [PATCH v3 0/3] mlxbf_gige: Fix several bugs Asmaa Mnebhi
2023-09-22 17:36 ` [PATCH v3 1/3] mlxbf_gige: Fix kernel panic at shutdown Asmaa Mnebhi
2023-09-22 17:44 ` Florian Fainelli
2023-10-13 14:58 ` Asmaa Mnebhi
2024-01-05 16:05 ` Asmaa Mnebhi
2023-09-22 17:36 ` [PATCH v3 2/3] mlxbf_gige: Fix intermittent no ip issue Asmaa Mnebhi
2023-09-22 17:47 ` Florian Fainelli
2023-10-13 15:00 ` Asmaa Mnebhi
2023-10-16 17:45 ` Asmaa Mnebhi
2023-09-22 17:36 ` Asmaa Mnebhi [this message]
2023-09-22 17:48 ` [PATCH v3 3/3] mlxbf_gige: Enable the GigE port in mlxbf_gige_open Florian Fainelli
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=20230922173626.23790-4-asmaa@nvidia.com \
--to=asmaa@nvidia.com \
--cc=davem@davemloft.net \
--cc=davthompson@nvidia.com \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.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).