netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Andrew Lunn <andrew@lunn.ch>,
	netdev@vger.kernel.org, Florian Fainelli <f.fainelli@gmail.com>,
	David Miller <davem@davemloft.net>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: phy: add suspend_halted module param
Date: Wed, 26 Feb 2014 19:21:17 +0100	[thread overview]
Message-ID: <20140226182117.GB14907@lunn.ch> (raw)
In-Reply-To: <530D1B7C.2090506@gmail.com>

On Tue, Feb 25, 2014 at 11:38:52PM +0100, Sebastian Hesselbarth wrote:
> On 02/24/2014 08:15 PM, Andrew Lunn wrote:
> >On Sun, Feb 23, 2014 at 05:58:39PM +0100, Sebastian Hesselbarth wrote:
> >>commit 1211ce53077164e0d34641d0ca5fb4d4a7574498
> >>   ("net: phy: resume/suspend PHYs on attach/detach")
> >>introduced a feature to suspend PHYs when entering halted state.
> >>
> >>Unfortunately, not all bootloaders properly power-up PHYs on reset
> >>and fail to access ethernet because the PHY is still powered down.
> >>
> >>Therefore, we add a boolean module parameter suspend_halted with
> >>default value of true. Disabling that parameter prevents PHYs from
> >>being suspended when entering halted state.
> >
> >Am i doing something silly here?
> >
> >root@qnap:/sys/module/libphy/parameters# cat suspend_halted
> >Y
> >root@qnap:/sys/module/libphy/parameters# echo N > suspend_halted
> >root@qnap:/sys/module/libphy/parameters# cat suspend_halted
> >N
> >root@qnap:/sys/module/libphy/parameters# reboot
> 
> Just to be sure, can you ifconfig up the interface before reboot?
> The PHY could already be powered-down, if the interface is down.
> 
> >...
> >...
> >
> >Net:   egiga0 [PRIME]
> >Hit any key to stop autoboot:  0
> >Send Cmd : 0x68 to UART1
> >egiga0 no link
> >Using egiga0 device
> >TFTP from server 10.0.0.1; our IP address is 10.0.0.2
> >Filename 'uImage-qnap'.
> >Load address: 0x800000
> >Loading: T T
> >
> >Does not seem to work.
> 
> I tested the patch on Topkick (w/ 88E1318S, 0x0141 0x0e90) which
> bootloader is also affected.
> 
> Both, libphy.suspend_halted=0 as kernel boot parameter and sysfs
> procedure above successfully prevent the PHY from being powered
> down. After reboot, u-boot tftpboot works as expected.

Hi Sebastian

I tested again, and it seems like i made an error. This patch does
actually fix the problem.

The u-boot on this device is somewhat broken, when it comes to
networking and tftpboot. It seems like if the auto negotiation is not
complete before the TFTP starts, it never works. There are no
retransmits of the RRQ message. If i ^C it and start again, it does
work.

As to the comment from davem about not using a kernel parameter. How
about turning it all around. Put a boolean parameter into DT PHY node
to indicate when it is safe to power down an idle phy?

   Andrew

  reply	other threads:[~2014-02-26 18:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-23 16:58 [PATCH] net: phy: add suspend_halted module param Sebastian Hesselbarth
2014-02-24 18:20 ` Florian Fainelli
2014-02-24 23:05   ` David Miller
2014-02-24 23:34     ` Sebastian Hesselbarth
2014-02-24 19:15 ` Andrew Lunn
2014-02-24 19:37   ` Florian Fainelli
2014-02-24 19:39     ` Andrew Lunn
2014-02-25 22:38   ` Sebastian Hesselbarth
2014-02-26 18:21     ` Andrew Lunn [this message]
2014-02-26 18:30       ` Florian Fainelli
2014-02-26 19:10         ` Andrew Lunn
2014-02-26 19:35           ` Florian Fainelli
2014-02-26 20:22             ` Andrew Lunn
2014-03-07 11:34 ` [PATCH] net: phy: Add sysfs attribute to prevent PHY suspend Sebastian Hesselbarth
2014-03-08  1:09   ` Florian Fainelli
2014-03-09 23:12   ` David Miller
2014-03-09 23:25     ` Sebastian Hesselbarth
2014-03-10  0:30       ` David Miller
2014-03-10  0:37         ` Sebastian Hesselbarth
2014-03-10  0:41           ` David Miller
2014-03-10  0:53             ` Sebastian Hesselbarth
2014-03-10  3:40               ` David Miller
2014-03-10 10:28                 ` Sebastian Hesselbarth
2014-03-10 14:25               ` One Thousand Gnomes
2014-03-10 16:56                 ` Florian Fainelli

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=20140226182117.GB14907@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=sebastian.hesselbarth@gmail.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).