lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 27 Nov 2018 22:02:41 +0100
From:   Geert Uytterhoeven <geert@...ux-m68k.org>
To:     Heiner Kallweit <hkallweit1@...il.com>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Yoshihiro Shimoda <yoshihiro.shimoda.uh@...esas.com>,
        Florian Fainelli <f.fainelli@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        netdev <netdev@...r.kernel.org>,
        Linux-Renesas <linux-renesas-soc@...r.kernel.org>,
        "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
        <devicetree@...r.kernel.org>
Subject: Re: [PATCH/RFC] net: phy: device: Don't deassert the reset when
 register and probe

Hi Heiner,

On Tue, Nov 27, 2018 at 8:47 PM Heiner Kallweit <hkallweit1@...il.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@...ux-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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ