All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Praneeth Bajjuri <praneeth@ti.com>, Geet Modi <geet.modi@ti.com>,
	Andrew Lunn <andrew@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Sasha Levin <sashal@kernel.org>,
	netdev@vger.kernel.org
Subject: [PATCH AUTOSEL 5.10 20/35] net: phy: dp83867: perform soft reset and retain established link
Date: Mon, 21 Jun 2021 13:52:45 -0400	[thread overview]
Message-ID: <20210621175300.735437-20-sashal@kernel.org> (raw)
In-Reply-To: <20210621175300.735437-1-sashal@kernel.org>

From: Praneeth Bajjuri <praneeth@ti.com>

[ Upstream commit da9ef50f545f86ffe6ff786174d26500c4db737a ]

Current logic is performing hard reset and causing the programmed
registers to be wiped out.

as per datasheet: https://www.ti.com/lit/ds/symlink/dp83867cr.pdf
8.6.26 Control Register (CTRL)

do SW_RESTART to perform a reset not including the registers,
If performed when link is already present,
it will drop the link and trigger re-auto negotiation.

Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
Signed-off-by: Geet Modi <geet.modi@ti.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/net/phy/dp83867.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c
index 69d3eacc2b96..c716074fdef0 100644
--- a/drivers/net/phy/dp83867.c
+++ b/drivers/net/phy/dp83867.c
@@ -792,16 +792,12 @@ static int dp83867_phy_reset(struct phy_device *phydev)
 {
 	int err;
 
-	err = phy_write(phydev, DP83867_CTRL, DP83867_SW_RESET);
+	err = phy_write(phydev, DP83867_CTRL, DP83867_SW_RESTART);
 	if (err < 0)
 		return err;
 
 	usleep_range(10, 20);
 
-	/* After reset FORCE_LINK_GOOD bit is set. Although the
-	 * default value should be unset. Disable FORCE_LINK_GOOD
-	 * for the phy to work properly.
-	 */
 	return phy_modify(phydev, MII_DP83867_PHYCTRL,
 			 DP83867_PHYCR_FORCE_LINK_GOOD, 0);
 }
-- 
2.30.2


  parent reply	other threads:[~2021-06-21 17:57 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 17:52 [PATCH AUTOSEL 5.10 01/35] dmaengine: zynqmp_dma: Fix PM reference leak in zynqmp_dma_alloc_chan_resourc() Sasha Levin
2021-06-21 17:52 ` Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 02/35] dmaengine: stm32-mdma: fix PM reference leak in stm32_mdma_alloc_chan_resourc() Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 03/35] dmaengine: xilinx: dpdma: Add missing dependencies to Kconfig Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 04/35] dmaengine: xilinx: dpdma: Limit descriptor IDs to 16 bits Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 05/35] mac80211: remove warning in ieee80211_get_sband() Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 06/35] mac80211_hwsim: drop pending frames on stop Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 07/35] cfg80211: call cfg80211_leave_ocb when switching away from OCB Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 08/35] dmaengine: rcar-dmac: Fix PM reference leak in rcar_dmac_probe() Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 09/35] dmaengine: mediatek: free the proper desc in desc_free handler Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 10/35] dmaengine: mediatek: do not issue a new desc if one is still current Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 11/35] dmaengine: mediatek: use GFP_NOWAIT instead of GFP_ATOMIC in prep_dma Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 12/35] net: ipv4: Remove unneed BUG() function Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 13/35] mac80211: drop multicast fragments Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 14/35] net: ethtool: clear heap allocations for ethtool function Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 15/35] inet: annotate data race in inet_send_prepare() and inet_dgram_connect() Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 16/35] ping: Check return value of function 'ping_queue_rcv_skb' Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 17/35] net: annotate data race in sock_error() Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 18/35] inet: annotate date races around sk->sk_txhash Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 19/35] net/packet: annotate data race in packet_sendmsg() Sasha Levin
2021-06-21 17:52 ` Sasha Levin [this message]
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 21/35] riscv32: Use medany C model for modules Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 22/35] net: caif: fix memory leak in ldisc_open Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 23/35] net/packet: annotate accesses to po->bind Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 24/35] net/packet: annotate accesses to po->ifindex Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 25/35] r8152: Avoid memcpy() over-reading of ETH_SS_STATS Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 26/35] sh_eth: " Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 27/35] r8169: " Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 28/35] KVM: selftests: Fix kvm_check_cap() assertion Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 29/35] net: qed: Fix memcpy() overflow of qed_dcbx_params() Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 30/35] mac80211: reset profile_periodicity/ema_ap Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 31/35] mac80211: handle various extensible elements correctly Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 32/35] recordmcount: Correct st_shndx handling Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 33/35] PCI: Add AMD RS690 quirk to enable 64-bit DMA Sasha Levin
2021-06-21 17:52 ` [PATCH AUTOSEL 5.10 34/35] net: ll_temac: Add memory-barriers for TX BD access Sasha Levin
2021-06-21 17:52   ` Sasha Levin
2021-06-21 17:53 ` [PATCH AUTOSEL 5.10 35/35] net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY Sasha Levin
2021-06-21 17:53   ` 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=20210621175300.735437-20-sashal@kernel.org \
    --to=sashal@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=geet.modi@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=praneeth@ti.com \
    --cc=stable@vger.kernel.org \
    /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.