devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev <netdev@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH/RFC] net: phy: device: Don't deassert the reset when register and probe
Date: Tue, 27 Nov 2018 22:02:41 +0100	[thread overview]
Message-ID: <CAMuHMdVOFxDCmFDPgNbvsP9PEcw9yAtN8CPmF3=Tx79buDZWrg@mail.gmail.com> (raw)
In-Reply-To: <4aa356d3-7c99-a9d6-0e6c-d46be7e44948@gmail.com>

Hi Heiner,

On Tue, Nov 27, 2018 at 8:47 PM Heiner Kallweit <hkallweit1@gmail.com> wrote:
> On 27.11.2018 17:44, Andrew Lunn wrote:
> > On Tue, Nov 27, 2018 at 12:18:20PM +0000, Yoshihiro Shimoda wrote:
> >> Some PHY device needs edge signal of the reset, but the previous code
> >> is impossible to achieve it like following:
> >>
> >>  1) Kernel boots by using initramfs.
> >>  --> No open the nic, so the provious code deasserts the reset by
> >>      phy_device_register() and phy_probe().
> >>  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.
> >
> > Hi Yoshihiro
> >
> > It sounds like you should be adding code to the suspend/resume
> > handling of phylib, so that it toggle the reset on resume. You cannot
> > just delete code like you proposed, it is going to break devices. But
> > adding code should be O.K.
> >
> The commit message mentions that the patch is supposed to fix some
> issue on the Salvator-XS board. I found the following from a year ago
> https://www.spinics.net/lists/netdev/msg457308.html
> which is also about PHY reset and this board. Is there still something
> open?  But as Andrew mentioned already: Just deleting code w/o
> checking what it's good for and whether this could have side effects,
> isn't a solution. Especially because the patch would silently remove
> the call to phy_scan_fixups().

That's correct: my original motivation for picking up Sergei's patches was to
make Ethernet work after suspend/resume on the same Salvator-XS board.

The main difference seems to be that I was using NFS root, while Shimoda-san
is using an initramfs.  Hence there probably is an inconsistency in reset
handling for an active vs. inactive Ethernet interface.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

  reply	other threads:[~2018-11-27 21:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27 12:18 [PATCH/RFC] net: phy: device: Don't deassert the reset when register and probe Yoshihiro Shimoda
2018-11-27 16:44 ` Andrew Lunn
2018-11-27 19:45   ` Heiner Kallweit
2018-11-27 21:02     ` Geert Uytterhoeven [this message]
2018-11-28  1:17     ` Yoshihiro Shimoda
2018-11-28  1:10   ` Yoshihiro Shimoda

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='CAMuHMdVOFxDCmFDPgNbvsP9PEcw9yAtN8CPmF3=Tx79buDZWrg@mail.gmail.com' \
    --to=geert@linux-m68k.org \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshihiro.shimoda.uh@renesas.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).