netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] net: phy: micrel: add tobling phy reset
@ 2018-11-28  9:02 Yoshihiro Shimoda
  2018-11-28  9:02 ` [PATCH v2 1/2] net: phy: Fix not to call phy_resume() if PHY is not attached Yoshihiro Shimoda
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Yoshihiro Shimoda @ 2018-11-28  9:02 UTC (permalink / raw)
  To: andrew@lunn.ch, f.fainelli@gmail.com, davem@davemloft.net
  Cc: netdev@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	devicetree@vger.kernel.org, Yoshihiro Shimoda

This patch set is for R-Car Gen3 Salvator-XS boards. If we do
the following method, the phy cannot link up correctly.

 1) Kernel boots by using initramfs.
 --> No open the nic, so phy_device_register() and phy_probe()
     deasserts the reset.
 2) Kernel enters the suspend.
 --> So, keep the reset signal as deassert.
 --> On R-Car Salvator-XS board, unfortunately, the board power is
     turned off.
 3) Kernel returns from suspend.
 4) ifconfig eth0 up
 --> Then, since edge signal of the reset doesn't happen,
     it cannot link up.
 5) ifconfig eth0 down
 6) ifconfig eth0 up
 --> In this case, it can link up.

When resolving this issue after I got feedback from Andrew and Heiner,
I found an issue that the phy_device.c didn't call phy_resume()
if the PHY was not attached. So, patch 1 fixes it and add toggling
the phy reset to the micrel phy driver.

Changes from v1 (as RFC):
 - No remove the current code of phy_device.c to avoid any side effects.
 - Fix the mdio_bus_phy_resume() in phy_device.c.
 - Add toggling the phy reset in micrel.c if the PHY is not attached.

Yoshihiro Shimoda (2):
  net: phy: Fix not to call phy_resume() if PHY is not attached
  net: phy: micrel: add toggling phy reset if PHY is not attached

 drivers/net/phy/micrel.c     |  8 ++++++++
 drivers/net/phy/phy_device.c | 11 ++++++-----
 2 files changed, 14 insertions(+), 5 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-12-17 10:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-28  9:02 [PATCH v2 0/2] net: phy: micrel: add tobling phy reset Yoshihiro Shimoda
2018-11-28  9:02 ` [PATCH v2 1/2] net: phy: Fix not to call phy_resume() if PHY is not attached Yoshihiro Shimoda
2018-11-28  9:02 ` [PATCH v2 2/2] net: phy: micrel: add toggling phy reset " Yoshihiro Shimoda
2018-12-03 23:20 ` [PATCH v2 0/2] net: phy: micrel: add tobling phy reset David Miller
2018-12-03 23:24   ` Florian Fainelli
2018-12-03 23:37     ` David Miller
2018-12-04 10:43     ` Andrew Lunn
2018-12-04 16:49       ` David Miller
2018-12-17 10:46       ` Yoshihiro Shimoda

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).