From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Shravya Kumbham <shravya.kumbham@xilinx.com>,
Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>,
Andrew Lunn <andrew@lunn.ch>, Paolo Abeni <pabeni@redhat.com>,
Sasha Levin <sashal@kernel.org>,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
michal.simek@xilinx.com, yuehaibing@huawei.com,
linmq006@gmail.com, trix@redhat.com,
prabhakar.mahadev-lad.rj@bp.renesas.com, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH AUTOSEL 5.4 6/8] net: emaclite: Don't advertise 1000BASE-T and do auto negotiation
Date: Tue, 10 May 2022 11:45:34 -0400 [thread overview]
Message-ID: <20220510154536.154070-6-sashal@kernel.org> (raw)
In-Reply-To: <20220510154536.154070-1-sashal@kernel.org>
From: Shravya Kumbham <shravya.kumbham@xilinx.com>
[ Upstream commit b800528b97d0adc3a5ba42d78a8b0d3f07a31f44 ]
In xemaclite_open() function we are setting the max speed of
emaclite to 100Mb using phy_set_max_speed() function so,
there is no need to write the advertising registers to stop
giga-bit speed and the phy_start() function starts the
auto-negotiation so, there is no need to handle it separately
using advertising registers. Remove the phy_read and phy_write
of advertising registers in xemaclite_open() function.
Signed-off-by: Shravya Kumbham <shravya.kumbham@xilinx.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@xilinx.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 15 ---------------
1 file changed, 15 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 63a2d1bcccfb..5fae598c4f76 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -923,8 +923,6 @@ static int xemaclite_open(struct net_device *dev)
xemaclite_disable_interrupts(lp);
if (lp->phy_node) {
- u32 bmcr;
-
lp->phy_dev = of_phy_connect(lp->ndev, lp->phy_node,
xemaclite_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
@@ -935,19 +933,6 @@ static int xemaclite_open(struct net_device *dev)
/* EmacLite doesn't support giga-bit speeds */
phy_set_max_speed(lp->phy_dev, SPEED_100);
-
- /* Don't advertise 1000BASE-T Full/Half duplex speeds */
- phy_write(lp->phy_dev, MII_CTRL1000, 0);
-
- /* Advertise only 10 and 100mbps full/half duplex speeds */
- phy_write(lp->phy_dev, MII_ADVERTISE, ADVERTISE_ALL |
- ADVERTISE_CSMA);
-
- /* Restart auto negotiation */
- bmcr = phy_read(lp->phy_dev, MII_BMCR);
- bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
- phy_write(lp->phy_dev, MII_BMCR, bmcr);
-
phy_start(lp->phy_dev);
}
--
2.35.1
next prev parent reply other threads:[~2022-05-10 15:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-10 15:45 [PATCH AUTOSEL 5.4 1/8] hwmon: (f71882fg) Fix negative temperature Sasha Levin
2022-05-10 15:45 ` [PATCH AUTOSEL 5.4 2/8] ASoC: max98090: Reject invalid values in custom control put() Sasha Levin
2022-05-10 15:45 ` [PATCH AUTOSEL 5.4 3/8] ASoC: max98090: Generate notifications on changes for custom control Sasha Levin
2022-05-10 15:45 ` [PATCH AUTOSEL 5.4 4/8] ASoC: ops: Validate input values in snd_soc_put_volsw_range() Sasha Levin
2022-05-10 15:45 ` [PATCH AUTOSEL 5.4 5/8] s390: disable -Warray-bounds Sasha Levin
2022-05-10 15:45 ` Sasha Levin [this message]
2022-05-10 15:45 ` [PATCH AUTOSEL 5.4 7/8] tcp: resalt the secret every 10 seconds Sasha Levin
2022-05-10 15:45 ` [PATCH AUTOSEL 5.4 8/8] Revert "parisc: Fix patch code locking and flushing" Sasha Levin
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=20220510154536.154070-6-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linmq006@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=michal.simek@xilinx.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=radhey.shyam.pandey@xilinx.com \
--cc=shravya.kumbham@xilinx.com \
--cc=stable@vger.kernel.org \
--cc=trix@redhat.com \
--cc=yuehaibing@huawei.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