From: Vladimir Oltean <olteanv@gmail.com>
To: davem@davemloft.net, netdev@vger.kernel.org
Cc: andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@gmail.com,
claudiu.manoil@nxp.com, alexandru.marginean@nxp.com,
ioana.ciornei@nxp.com, linux@armlinux.org.uk
Subject: [PATCH net-next 1/7] net: dsa: felix: stop writing to read-only fields in MII_BMCR
Date: Thu, 25 Jun 2020 18:23:25 +0300 [thread overview]
Message-ID: <20200625152331.3784018-2-olteanv@gmail.com> (raw)
In-Reply-To: <20200625152331.3784018-1-olteanv@gmail.com>
From: Vladimir Oltean <vladimir.oltean@nxp.com>
It looks like BMCR_SPEED and BMCR_DUPLEX are read-only, since they are
actually configured through the vendor-specific IF_MODE (0x14) register.
So, don't perform bogus writes to these fields, giving the impression
that those writes do something.
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
---
drivers/net/dsa/ocelot/felix_vsc9959.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index 2067776773f7..3269c76b59ff 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -845,10 +845,7 @@ static void vsc9959_pcs_init_sgmii(struct phy_device *pcs,
ENETC_PCS_IF_MODE_SGMII_EN |
ENETC_PCS_IF_MODE_SGMII_SPEED(speed));
- /* Yes, not a mistake: speed is given by IF_MODE. */
- phy_write(pcs, MII_BMCR, BMCR_RESET |
- BMCR_SPEED1000 |
- BMCR_FULLDPLX);
+ phy_write(pcs, MII_BMCR, BMCR_RESET);
}
}
@@ -882,9 +879,7 @@ static void vsc9959_pcs_init_2500basex(struct phy_device *pcs,
ENETC_PCS_IF_MODE_SGMII_EN |
ENETC_PCS_IF_MODE_SGMII_SPEED(ENETC_PCS_SPEED_2500));
- phy_write(pcs, MII_BMCR, BMCR_SPEED1000 |
- BMCR_FULLDPLX |
- BMCR_RESET);
+ phy_write(pcs, MII_BMCR, BMCR_RESET);
}
static void vsc9959_pcs_init_usxgmii(struct phy_device *pcs,
--
2.25.1
next prev parent reply other threads:[~2020-06-25 15:23 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-25 15:23 [PATCH net-next 0/7] PHYLINK integration improvements for Felix DSA driver Vladimir Oltean
2020-06-25 15:23 ` Vladimir Oltean [this message]
2020-06-25 16:28 ` [PATCH net-next 1/7] net: dsa: felix: stop writing to read-only fields in MII_BMCR Russell King - ARM Linux admin
2020-06-25 15:23 ` [PATCH net-next 2/7] net: dsa: felix: support half-duplex link modes Vladimir Oltean
2020-06-25 16:30 ` Russell King - ARM Linux admin
2020-06-25 15:23 ` [PATCH net-next 3/7] net: dsa: felix: unconditionally configure MAC speed to 1000Mbps Vladimir Oltean
2020-06-25 15:23 ` [PATCH net-next 4/7] net: dsa: felix: set proper pause frame timers based on link speed Vladimir Oltean
2020-06-25 16:37 ` Russell King - ARM Linux admin
2020-06-25 16:48 ` Vladimir Oltean
2020-06-25 16:58 ` Russell King - ARM Linux admin
2020-06-25 17:06 ` Vladimir Oltean
2020-06-25 17:53 ` Russell King - ARM Linux admin
2020-06-25 15:23 ` [PATCH net-next 5/7] net: dsa: felix: delete .phylink_mac_an_restart code Vladimir Oltean
2020-06-25 16:53 ` Russell King - ARM Linux admin
2020-06-26 8:53 ` Vladimir Oltean
2020-06-26 11:08 ` Russell King - ARM Linux admin
2020-06-26 11:19 ` Vladimir Oltean
2020-06-26 11:32 ` Russell King - ARM Linux admin
2020-06-25 15:23 ` [PATCH net-next 6/7] net: dsa: felix: disable in-band AN in MII_BMCR without reset Vladimir Oltean
2020-06-25 15:23 ` [PATCH net-next 7/7] net: dsa: felix: use resolved link config in mac_link_up() Vladimir Oltean
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=20200625152331.3784018-2-olteanv@gmail.com \
--to=olteanv@gmail.com \
--cc=alexandru.marginean@nxp.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=ioana.ciornei@nxp.com \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--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).