From: David Epping <david.epping@missinglinkelectronics.com>
To: Vladimir Oltean <olteanv@gmail.com>, Andrew Lunn <andrew@lunn.ch>,
Russell King <linux@armlinux.org.uk>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
UNGLinuxDriver@microchip.com,
David Epping <david.epping@missinglinkelectronics.com>
Subject: [PATCH net v3 3/4] net: phy: mscc: remove unnecessary phydev locking
Date: Tue, 23 May 2023 17:31:07 +0200 [thread overview]
Message-ID: <20230523153108.18548-4-david.epping@missinglinkelectronics.com> (raw)
In-Reply-To: <20230523153108.18548-1-david.epping@missinglinkelectronics.com>
Holding the struct phy_device (phydev) lock is unnecessary when
accessing phydev->interface in the PHY driver .config_init method,
which is the only place that vsc85xx_rgmii_set_skews() is called from.
The phy_modify_paged() function implements required MDIO bus level
locking, which can not be achieved by a phydev lock.
Signed-off-by: David Epping <david.epping@missinglinkelectronics.com>
---
drivers/net/phy/mscc/mscc_main.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/net/phy/mscc/mscc_main.c b/drivers/net/phy/mscc/mscc_main.c
index 29fc27a16805..0c39b3ecb1f2 100644
--- a/drivers/net/phy/mscc/mscc_main.c
+++ b/drivers/net/phy/mscc/mscc_main.c
@@ -528,8 +528,6 @@ static int vsc85xx_rgmii_set_skews(struct phy_device *phydev, u32 rgmii_cntl,
u16 reg_val = 0;
int rc;
- mutex_lock(&phydev->lock);
-
if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID ||
phydev->interface == PHY_INTERFACE_MODE_RGMII_ID)
reg_val |= RGMII_CLK_DELAY_2_0_NS << rgmii_rx_delay_pos;
@@ -542,8 +540,6 @@ static int vsc85xx_rgmii_set_skews(struct phy_device *phydev, u32 rgmii_cntl,
rgmii_rx_delay_mask | rgmii_tx_delay_mask,
reg_val);
- mutex_unlock(&phydev->lock);
-
return rc;
}
--
2.17.1
next prev parent reply other threads:[~2023-05-23 15:31 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 15:31 [PATCH net v3 0/4] net: phy: mscc: support VSC8501 David Epping
2023-05-23 15:31 ` [PATCH net v3 1/4] net: phy: mscc: add VSC8502 to MODULE_DEVICE_TABLE David Epping
2023-05-23 15:31 ` [PATCH net v3 2/4] net: phy: mscc: add support for VSC8501 David Epping
2023-05-23 15:31 ` David Epping [this message]
2023-05-23 15:32 ` [PATCH net v3 3/4] net: phy: mscc: remove unnecessary phydev locking Russell King (Oracle)
2023-05-23 15:31 ` [PATCH net v3 4/4] net: phy: mscc: enable VSC8501/2 RGMII RX clock David Epping
2023-05-23 15:33 ` Russell King (Oracle)
2023-05-24 23:05 ` Vladimir Oltean
2023-05-25 5:20 ` [PATCH net v3 0/4] net: phy: mscc: support VSC8501 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=20230523153108.18548-4-david.epping@missinglinkelectronics.com \
--to=david.epping@missinglinkelectronics.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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 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.