From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>,
Russell King - ARM Linux <linux@armlinux.org.uk>,
Paolo Abeni <pabeni@redhat.com>,
David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: [PATCH v2 net-next] Revert "net: phy: improve mdiobus_stats_acct"
Date: Thu, 5 Mar 2026 18:42:04 +0100 [thread overview]
Message-ID: <c3a1aba9-3fae-4c4b-bcb1-fb620fb7a309@gmail.com> (raw)
This reverts commit 1afccc5a201ec7c9023370958bae1312369b64da.
As reported by Marek the change causes a warning on non-PREEMPT_RT
32 bit systems.
Reported-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
v2:
- add missing SoB
---
drivers/net/phy/mdio_bus.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index cf5ce1ed48c..00d0e4159e9 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -60,17 +60,22 @@ EXPORT_SYMBOL(mdiobus_is_registered_device);
static void mdiobus_stats_acct(struct mdio_bus_stats *stats, bool op, int ret)
{
+ preempt_disable();
u64_stats_update_begin(&stats->syncp);
u64_stats_inc(&stats->transfers);
- if (ret < 0)
+ if (ret < 0) {
u64_stats_inc(&stats->errors);
- else if (op)
+ goto out;
+ }
+
+ if (op)
u64_stats_inc(&stats->reads);
else
u64_stats_inc(&stats->writes);
-
+out:
u64_stats_update_end(&stats->syncp);
+ preempt_enable();
}
/**
--
2.53.0
next reply other threads:[~2026-03-05 17:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-05 17:42 Heiner Kallweit [this message]
2026-03-06 21:30 ` [PATCH v2 net-next] Revert "net: phy: improve mdiobus_stats_acct" patchwork-bot+netdevbpf
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=c3a1aba9-3fae-4c4b-bcb1-fb620fb7a309@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=netdev@vger.kernel.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.